This commit is contained in:
parent
4ec30a8ec8
commit
3db1515ecf
@ -1,5 +1,6 @@
|
||||
import { Struct } from './struct';
|
||||
import { load } from './loader';
|
||||
import { extendErrorMessage } from './common';
|
||||
|
||||
// Store Loaded Structures
|
||||
const structures: Record<string, Struct> = {};
|
||||
@ -20,11 +21,7 @@ export function getStructure(name: string) {
|
||||
// Return
|
||||
return target;
|
||||
} catch (e) {
|
||||
let message = 'Error Loading ' + name;
|
||||
if (e instanceof Error) {
|
||||
message += ': ' + e.message;
|
||||
}
|
||||
throw new Error(message);
|
||||
throw new Error(extendErrorMessage(e, 'Loading ' + name));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user