Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 15c1465

Browse files
committed
ErrorHandler: log errors/warnings to console before dispatching events
1 parent 69756d2 commit 15c1465

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/js/streaming/ErrorHandler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ MediaPlayer.dependencies.ErrorHandler = function () {
2020
debug: undefined,
2121

2222
sendWarning: function (code, message, data) {
23+
this.debug.warn("[Warn] Code: " + code + ", Message: " + message + ", Data: " + JSON.stringify(data, null, '\t'));
2324
this.eventBus.dispatchEvent({
2425
type: "warning",
2526
data: {code : code, message: message, data: data}
2627
});
27-
this.debug.warn("[Warn] Code: " + code + ", Message: " + message + ", Data: " + JSON.stringify(data, null, '\t'));
2828
},
2929

3030
sendError: function (code, message, data) {
31+
this.debug.error("[Error] Code: " + code + ", Message: " + message + ", Data: " + JSON.stringify(data, null, '\t'));
3132
this.eventBus.dispatchEvent({
3233
type: "error",
3334
data: {code : code, message: message, data: data}
3435
});
35-
this.debug.error("[Error] Code: " + code + ", Message: " + message + ", Data: " + JSON.stringify(data, null, '\t'));
3636
}
3737
};
3838
};

0 commit comments

Comments
 (0)