Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Change error handling method
Browse files Browse the repository at this point in the history
  • Loading branch information
SounD120 committed Nov 20, 2019
1 parent ceaf453 commit 96ecb2e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/chrome/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ export class Breakpoints {
{ scriptId: script.scriptId, lineNumber: args.endLine, columnNumber: args.endColumn || 0 } :
{ scriptId: script.scriptId, lineNumber: args.line + 1, columnNumber: 0 };

try {
const possibleBpResponse = await this.chrome.Debugger.getPossibleBreakpoints({
start: { scriptId: script.scriptId, lineNumber: args.line, columnNumber: args.column || 0 },
end,
restrictToFunction: false
});
const possibleBpResponse = await this.chrome.Debugger.getPossibleBreakpoints({
start: { scriptId: script.scriptId, lineNumber: args.line, columnNumber: args.column || 0 },
end,
restrictToFunction: false
});
if (possibleBpResponse.locations) {
let breakpoints = possibleBpResponse.locations.map(loc => {
return <DebugProtocol.Breakpoint>{
line: loc.lineNumber,
Expand All @@ -349,9 +349,7 @@ export class Breakpoints {
const response = { breakpoints };
this.adapter.lineColTransformer.setBreakpointsResponse(response);
return response as DebugProtocol.BreakpointLocationsResponse['body'];
} catch (e) {
// getPossibleBPs not supported
logger.log('breakpointsLocations failed: ' + e.message);
} else {
return { breakpoints: [] };
}
}
Expand Down

0 comments on commit 96ecb2e

Please sign in to comment.