improve throw info
This commit is contained in:
@@ -23,7 +23,7 @@ class InterfacesConfig {
|
||||
|
||||
Layers.InsertLast(LayerConfig);
|
||||
} catch {
|
||||
warn("Can't load layer \""+ i +"\" of Interface Config: \""+ Name +"\"");
|
||||
warn("Can't load layer \""+ i +"\" of Interface Config: \""+ Name +"\"\nException Message: " + getExceptionInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,10 @@ class LayerConfig {
|
||||
const string Manialink = GetManialink();
|
||||
Name = InterfacesManager::GetLayerName(Manialink);
|
||||
|
||||
if (Name.Length == 0) {
|
||||
throw('Can\'t find Manialink name');
|
||||
}
|
||||
|
||||
if (_Data.HasKey('LayerType') && _Data['LayerType'].GetType() == Json::Type::String) {
|
||||
LayerType = CastEUILayerType(_Data['LayerType']);
|
||||
}
|
||||
@@ -24,7 +28,7 @@ class LayerConfig {
|
||||
|
||||
string GetManialink() const {
|
||||
if (!IO::FileExists(Path)) {
|
||||
throw('Invalid Layer: Can\'t find "' + Path + '"');
|
||||
throw('File doesn\'t exists: "'+ Path +'"');
|
||||
}
|
||||
|
||||
IO::File File(Path, IO::FileMode::Read);
|
||||
|
Reference in New Issue
Block a user