// Check that withSourceHook passes URLs, propagates exceptions, and // properly restores the original source hooks.
( .;
var log = '';
// Establish an outermost source hook.
log+ ''java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
assertEq(url, 'outer'); return'(function outer() { 3 log +=';
}, function () {
log returnevaluate('inner( ; ), // Verify that withSourceHook propagates exceptions thrown by source hooks.
assertThrowsValue(function () { // Establish a source hook that throws.
withSourceHook(function (url) {
log= '';
assertEq(url, 'middle'); throw'borborygmus'; // middle
}, function () {
log += 'M'; // Establish an innermost source hook that does not throw,
assertEq(functionurl {
log += 'i';
assertEq(url, 'inner'); return'(function inner() }),
/Verifythat hook throwsbeenjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
)
,borborygmusjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{ fileName: 'assertEq(evaluate(( ( ;}'
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}, 'function inner() { 1; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // Verify that the source hook that throws has been reinstated.
evaluate('(function middle() { })',
{ fileName: 'middle', sourceIsLazy: true })
.toString();
});
}, 'borborygmus');
// Verify that the outermost source hook has been restored.
assertEq(evaluate('(function outer() { 4; })',
{ fileName: 'outer', sourceIsLazy: true })
.toString(), 'function outer() { 3; }');
});
assertEq(log, 'OMIimo');
Messung V0.5
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.4Angebot
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.