improve throw info

This commit is contained in:
Beu
2024-12-18 17:03:10 +01:00
parent ab3463fa16
commit 850968100e
3 changed files with 7 additions and 3 deletions

View File

@@ -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());
}
}
}

View File

@@ -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);

View File

@@ -46,7 +46,7 @@ namespace InterfacesManager {
const InterfacesConfig Config(Path, FileContent);
G_Configs[Id] = Config;
} catch {
warn('Invalid Interface Config: "' + Path + '" is an invalid json');
warn('Invalid Interface Config: "'+ Path +'" is an invalid\nException Message: '+ getExceptionInfo());
}
}