Debugger: Difference between revisions

36 bytes removed ,  1 March 2011
m
Line 41: Line 41:
; throw(frame, value) : The code running in <i>frame</i> is about to throw <i>value</i> as an exception. The value this hook function returns determines how execution proceeds, as for <i>interrupt</i>.
; throw(frame, value) : The code running in <i>frame</i> is about to throw <i>value</i> as an exception. The value this hook function returns determines how execution proceeds, as for <i>interrupt</i>.


; error(frame, report) : SpiderMonkey is about to report an error in <i>frame</i>. <i>Report</i> is an object describing the error, with the following properties:<p><dl><dt>message<dd>The fully formatted error message. <dt>file<dd>If present, the source file name, URL, etc. (If this property is present, the <i>line</i> property will be too, and vice versa.)<dt>line<dd>If present, the source line number at which the error occurred.</dd> <dt>lineText<dd>If present, this is the source code of the offending line.</dd> <dt>offset<dd>The index of the character within lineText at which the error occurred.</dd> <dt>warning<dd>Present and true if this is a warning; absent otherwise.</dd> <dt>strict<dd>Present and true if this error or warning is due to the strict option (not to be confused with ES strict mode) <dt>exception<dd>Present and true if an exception will be thrown; absent otherwise.</dd> <dt>arguments<dd>An array of strings, representing the arguments substituted into the error message.</dd> </dl></p>
; error(frame, report) : SpiderMonkey is about to report an error in <i>frame</i>. <i>Report</i> is an object describing the error, with the following properties:<p><dl><dt>message<dd>The fully formatted error message. <dt>file<dd>If present, the source file name, URL, etc. (If this property is present, the <i>line</i> property will be too, and vice versa.)<dt>line<dd>If present, the source line number at which the error occurred.<dt>lineText<dd>If present, this is the source code of the offending line.<dt>offset<dd>The index of the character within lineText at which the error occurred.<dt>warning<dd>Present and true if this is a warning; absent otherwise.<dt>strict<dd>Present and true if this error or warning is due to the strict option (not to be confused with ES strict mode) <dt>exception<dd>Present and true if an exception will be thrown; absent otherwise.<dt>arguments<dd>An array of strings, representing the arguments substituted into the error message.</dl></p>


==Debug.Frame==
==Debug.Frame==
Confirmed users
497

edits