- Throw Error objects instead of Strings.
This commit is contained in:
@@ -80,7 +80,7 @@ mindplot.IconGroup = new Class({
|
||||
}, this);
|
||||
|
||||
if (result == null) {
|
||||
throw "Icon can no be found.";
|
||||
throw new Error("Icon can no be found:" + iconModel);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@@ -47,7 +47,7 @@ mindplot.LocalStorageManager = new Class({
|
||||
|
||||
// If I could not load it from a file, hard code one.
|
||||
if (xml == null) {
|
||||
throw "Map could not be loaded";
|
||||
throw new Error("Map could not be loaded");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user