Add error notice popup for resource import.
This commit is contained in:
@@ -116,7 +116,14 @@ namespace Cryville.Crtr.Browsing {
|
||||
var file = new FileInfo(path);
|
||||
if (!converters.ContainsKey(file.Extension)) return false;
|
||||
foreach (var converter in converters[file.Extension]) {
|
||||
var resources = converter.ConvertFrom(file);
|
||||
IEnumerable<Resource> resources = null;
|
||||
try {
|
||||
resources = converter.ConvertFrom(file);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
CallHelper.ShowMessageBox(ex.Message);
|
||||
return false;
|
||||
}
|
||||
foreach (var res in resources) {
|
||||
if (!res.Valid) {
|
||||
Logger.Log("main", 3, "Resource", "Attempt to import invalid resource {0}", res);
|
||||
|
Reference in New Issue
Block a user