mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-11-29 10:53:43 +00:00
Improve error handling in ChromeObject
Enhanced error handling by returning a structured error object when exceptions occur in ChromeObject. Also updated the version info to 0.5.2.
This commit is contained in:
parent
1533059e44
commit
7a05916319
|
|
@ -445,13 +445,16 @@ var ChromeObject = function() {
|
|||
if ("result" in response) {
|
||||
(function(r) {
|
||||
if ("subtype" in r && r.subtype == "error") {
|
||||
console.warn("[WebBrowser]", r.description);
|
||||
console.warn(r.description);
|
||||
}
|
||||
})(response.result.result);
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(e.message);
|
||||
response = {};
|
||||
response = {
|
||||
error: true,
|
||||
message: e && e.message ? e.message : "Request failed"
|
||||
};
|
||||
}
|
||||
|
||||
pageEventId.set(pageEventId.get() + 1);
|
||||
|
|
@ -1504,7 +1507,7 @@ exports.startDebugInPrivate = function(url, proxy, profileName, debuggingPort, i
|
|||
|
||||
exports.publisherName = publisherName;
|
||||
|
||||
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.5.1";
|
||||
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.5.2";
|
||||
exports.AUTHOR = "gnh1201@catswords.re.kr";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user