mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 11:01:53 +08:00
refactoring
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user