初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器 HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块 Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚 AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
|
||||
namespace PCL.Core.Minecraft.Saves.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// 存档损坏异常 —— level.dat 存在但无法解析或无法写入时抛出。
|
||||
/// </summary>
|
||||
public class SaveCorruptedException : Exception
|
||||
{
|
||||
/// <summary>存档文件夹的绝对路径。</summary>
|
||||
public string FolderPath { get; }
|
||||
|
||||
public SaveCorruptedException(string folderPath)
|
||||
: base($"存档损坏:无法解析 '{folderPath}' 中的 level.dat")
|
||||
{
|
||||
FolderPath = folderPath;
|
||||
}
|
||||
|
||||
public SaveCorruptedException(string folderPath, string message)
|
||||
: base(message)
|
||||
{
|
||||
FolderPath = folderPath;
|
||||
}
|
||||
|
||||
public SaveCorruptedException(string folderPath, string message, Exception inner)
|
||||
: base(message, inner)
|
||||
{
|
||||
FolderPath = folderPath;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
|
||||
namespace PCL.Core.Minecraft.Saves.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// 存档未找到异常 —— level.dat 缺失或指定文件夹非有效存档时抛出。
|
||||
/// </summary>
|
||||
public class SaveNotFoundException : Exception
|
||||
{
|
||||
/// <summary>存档文件夹的绝对路径。</summary>
|
||||
public string FolderPath { get; }
|
||||
|
||||
public SaveNotFoundException(string folderPath)
|
||||
: base($"未找到存档:'{folderPath}' 中缺少 level.dat")
|
||||
{
|
||||
FolderPath = folderPath;
|
||||
}
|
||||
|
||||
public SaveNotFoundException(string folderPath, string message)
|
||||
: base(message)
|
||||
{
|
||||
FolderPath = folderPath;
|
||||
}
|
||||
|
||||
public SaveNotFoundException(string folderPath, string message, Exception inner)
|
||||
: base(message, inner)
|
||||
{
|
||||
FolderPath = folderPath;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user