META-INF.resources.bower_components.globalize.src.common.create-error.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-globalize Show documentation
Show all versions of jwebmp-globalize Show documentation
The JWebSwing implementation for a full Globalization
define([
"./format-message",
"../util/object/extend"
], function (formatMessage, objectExtend) {
return function (code, message, attributes) {
var error;
message = code + (message ? ": " + formatMessage(message, attributes) : "");
error = new Error(message);
error.code = code;
objectExtend(error, attributes);
return error;
};
});