refactoring

This commit is contained in:
Maxim Devaev
2024-09-18 04:37:43 +03:00
parent 45270a09d7
commit 7a53f14456
83 changed files with 517 additions and 516 deletions

View File

@@ -141,8 +141,8 @@ export function Msd() {
if (!result.ok) {
msg = `Can't upload image to the Mass Storage Drive:<br>${result_str}`;
}
} catch (err) {
msg = `Can't parse upload result:<br>${err}`;
} catch (ex) {
msg = `Can't parse upload result:<br>${ex}`;
}
if (msg.length > 0) {
wm.error(msg);

View File

@@ -214,8 +214,8 @@ export function Recorder() {
__events = events;
__events_time = events_time;
} catch (err) {
wm.error(`Invalid script: ${err}`);
} catch (ex) {
wm.error(`Invalid script: ${ex}`);
}
el_input.value = "";

View File

@@ -411,8 +411,8 @@ export function Session() {
throw new Error("Too many missed heartbeats");
}
__ws.send("{\"event_type\": \"ping\", \"event\": {}}");
} catch (err) {
__wsErrorHandler(err.message);
} catch (ex) {
__wsErrorHandler(ex.message);
}
};

View File

@@ -435,8 +435,8 @@ JanusStreamer.ensure_janus = function(callback) {
callback(true);
},
});
}).catch((err) => {
tools.error("Stream: Can't import Janus module:", err);
}).catch((ex) => {
tools.error("Stream: Can't import Janus module:", ex);
callback(false);
});
} else {