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