function assert_throws(ex, func) { if (!("name" in ex)) {
do_throw( "first argument to assert_throws must be of the form " + "{'name': something}"
);
}
let msg = "expected to catch an exception named " + ex.name;
// Call this here, not in the 'try' clause, so do_report_result's own // throw doesn't get caught by our 'catch' clause.
do_report_result( false,
msg + ", but returned normally",
Components.stack.caller, false
);
}
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.