@mr-mkz/atlas
Version:
Atlas is a library that gives you region, subregion, country, state and city names with some special information if you want.
18 lines (15 loc) • 363 B
JavaScript
class AtlasError extends Error {
constructor(message, type, tips, data) {
super(message);
this.name = "AtlasError -> " + type;
if (tips) {
this.tips = tips;
}
if (data) {
this.data = data;
}
}
}
export function raiseError(message, type, tips, data) {
throw new AtlasError(message, type, tips, data);
}