mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #9885. Catch exceptions in track design writing
This commit is contained in:
parent
1d67f86cc1
commit
748a6338a9
|
@ -33,8 +33,16 @@ T6Exporter::T6Exporter(TrackDesign* trackDesign)
|
|||
|
||||
bool T6Exporter::SaveTrack(const utf8* path)
|
||||
{
|
||||
auto fs = FileStream(path, FILE_MODE_WRITE);
|
||||
return SaveTrack(&fs);
|
||||
try
|
||||
{
|
||||
auto fs = FileStream(path, FILE_MODE_WRITE);
|
||||
return SaveTrack(&fs);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
log_error("Unable to save track design: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool T6Exporter::SaveTrack(IStream* stream)
|
||||
|
|
Loading…
Reference in New Issue