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:
parent
ebeba463b4
commit
8eff529b9d
3 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)}");
|
||||
|
|
|
@ -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)}");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue