[client] Exception -> Error

This commit is contained in:
Starbeamrainbowlabs 2019-03-29 21:03:38 +00:00
parent 840619ef0d
commit d011a61b7e
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ class LayerDeviceMarkers {
async marker_popup_open_handler(device_id, event) { async marker_popup_open_handler(device_id, event) {
if(typeof device_id !== "number") if(typeof device_id !== "number")
throw new Exception("Error: Invalid device id passed."); throw new Error("Error: Invalid device id passed.");
console.info("Fetching device info for device", device_id); console.info("Fetching device info for device", device_id);
let device_info = JSON.parse(await GetFromUrl(`${Config.api_root}?action=device-info&device-id=${device_id}`)); let device_info = JSON.parse(await GetFromUrl(`${Config.api_root}?action=device-info&device-id=${device_id}`));

View file

@ -104,9 +104,9 @@ class LayerHeatmap {
async update_data(datetime, reading_type) { async update_data(datetime, reading_type) {
if(!(datetime instanceof Date)) if(!(datetime instanceof Date))
throw new Exception("Error: 'datetime' must be an instance of Date."); throw new Error("Error: 'datetime' must be an instance of Date.");
if(typeof reading_type != "string") if(typeof reading_type != "string")
throw new Exception("Error: 'reading_type' must be a string."); throw new Error("Error: 'reading_type' must be a string.");
this.datetime = datetime; this.datetime = datetime;
this.reading_type = reading_type; this.reading_type = reading_type;