mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +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 scrolling panels to contain other scrolling panels
|
||||||
- Allow dropdowns to have 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
|
## 6.2.0
|
||||||
|
|
||||||
### MLEM
|
### MLEM
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace MLEM.Data.Content {
|
||||||
r.Name = assetName;
|
r.Name = assetName;
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException) {}
|
} catch (IOException) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new ContentLoadException($"Asset {assetName} not found. Tried files {string.Join(", ", triedFiles)}");
|
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))
|
using (var reader = new JsonTextReader(stream))
|
||||||
return serializerToUse.Deserialize<T>(reader);
|
return serializerToUse.Deserialize<T>(reader);
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException) {}
|
} catch (IOException) {}
|
||||||
}
|
}
|
||||||
throw new ContentLoadException($"Asset {name} not found. Tried files {string.Join(", ", triedFiles)}");
|
throw new ContentLoadException($"Asset {name} not found. Tried files {string.Join(", ", triedFiles)}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue