1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-26 02:09:24 +01:00

Fixed various exception types not being wrapped by ContentLoadExceptions when loading raw or JSON content

This commit is contained in:
Ell 2023-09-27 18:58:09 +02:00
parent ebeba463b4
commit 8eff529b9d
3 changed files with 6 additions and 2 deletions

View file

@ -28,6 +28,10 @@ Improvements
- Allow scrolling panels to contain other scrolling panels
- Allow dropdowns to have scrolling panels
### MLEM.Data
Fixes
- Fixed various exception types not being wrapped by ContentLoadExceptions when loading raw or JSON content
## 6.2.0
### MLEM

View file

@ -100,7 +100,7 @@ namespace MLEM.Data.Content {
r.Name = assetName;
return t;
}
} catch (FileNotFoundException) {}
} catch (IOException) {}
}
}
throw new ContentLoadException($"Asset {assetName} not found. Tried files {string.Join(", ", triedFiles)}");

View file

@ -68,7 +68,7 @@ namespace MLEM.Data {
using (var reader = new JsonTextReader(stream))
return serializerToUse.Deserialize<T>(reader);
}
} catch (FileNotFoundException) {}
} catch (IOException) {}
}
throw new ContentLoadException($"Asset {name} not found. Tried files {string.Join(", ", triedFiles)}");
}