Search completed in 1.64 seconds.
1443 results for "exception":
Your results are loading. Please wait...
Exception logging in JavaScript - Archive of obsolete content
in versions of firefox prior to firefox 3, all javascript exceptions were always logged into the error console if they remained unhandled at the time execution returned back into c++ code.
... as a result, if, for example, c++ code called a javascript component, which threw an exception, that exception would be logged to the console before control was returned to the c++ caller.
...javascript code is sometimes designed to throw exceptions to report a result condition back to the c++ caller.
...And 14 more matches
JSException - Archive of obsolete content
summary the public class jsexception extends runtimeexception java.lang.object | +----java.lang.throwable | +----java.lang.exception | +----java.lang.runtimeexception | +----netscape.javascript.jsexception description jsexception is an exception which is thrown when javascript code returns an error.
... constructor summary the netscape.javascript.jsexception class has the following constructors: jsexception deprecated constructors optionally let you specify a detail message and other information.
... method summary the netscape.javascript.jsexception class has the following methods: getwrappedexception instance method getwrappedexception.
...And 12 more matches
JS_IsExceptionPending
determine whether an exception is pending in the js engine.
... syntax bool js_isexceptionpending(jscontext *cx); name type description cx jscontext * pointer to a js context to check for pending exceptions.
... description js_isexceptionpending returns true if an exception has been thrown in the context cx and the exception has not yet been caught or cleared.
...And 8 more matches
JS_SetPendingException
sets the current exception being thrown within a context.
... syntax void js_setpendingexception(jscontext *cx, js::handlevalue v); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... v js::handlevalue value to throw as an exception.
...And 7 more matches
DOMException - Web APIs
the domexception interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web api.
... each exception has a name, which is a short "camelcase" style string identifying the error or abnormal condition.
... constructor domexception() returns a domexception object with a specified message and name.
...And 6 more matches
JS_ClearPendingException
clear the currently pending exception in a context.
... syntax void js_clearpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
... description js_clearpendingexception cancels the currently pending exception in cx, if any.
...And 5 more matches
JS_ReportPendingException
forward the current pending exception in a given jscontext to the current jserrorreporter callback.
... syntax bool js_reportpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
... description if an exception is pending in the context cx, js_reportpendingexception converts the exception to a string and reports it to the current error reporter.
...And 5 more matches
JS_SaveExceptionState
saves the exception state from the specified context.
... syntax jsexceptionstate * js_saveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description saves the current exception state (that is, any pending exception, or a cleared exception state) associated with the specified context cx, and returns a jsexceptionstate object holding this state.
...And 5 more matches
JS_RestoreExceptionState
restores the exception state from a jsexceptionstate object previously created using js_saveexceptionstate.
... syntax void js_restoreexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... state jsexceptionstate * pointer to the jsexceptionstate object to restore exception state from.
...And 4 more matches
JS_DropExceptionState
destroys a jsexceptionstate object previously created using js_saveexceptionstate.
... syntax void js_dropexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... state jsexceptionstate * pointer to the jsexceptionstate object to destroy.
...And 3 more matches
JS_ErrorFromException
get or create jserrorreport from an exception object.
... syntax jserrorreport * js_errorfromexception(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to a js context whose errors should be reported via your function.
... obj js::handleobject an exception object.
...And 3 more matches
nsIXPCException
js/src/xpconnect/idl/xpcexception.idlscriptable these exception objects are the preferred types of exceptions when implementing xpcom interfaces in javascript.
... inherits from: nsiexception last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void initialize(in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner); xpcexjsval stealjsval(); native code only!
... methods initialize() void initialize( in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner ); parameters amessage aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval(); parameters none.
...And 3 more matches
DOMException() - Web APIs
the domexception() constructor returns a domexception object with a specified message and name.
... syntax var domexception = new domexception(); var domexception = new domexception(message); var domexception = new domexception(message, name); parameters message optional a description of the exception.
... return value domexception a newly created domexception object.
...And 3 more matches
JS::AutoSaveExceptionState
this article covers features introduced in spidermonkey 31 save and later restore the current exception state of a given jscontext.
... syntax js::autosaveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description js::autosaveexceptionstate saves and later restores the current exception state of a given jscontext.
...And 2 more matches
JS_GetPendingException
get the current pending exception for a given jscontext.
... syntax bool js_getpendingexception(jscontext *cx, js::mutablehandlevalue vp); name type description cx jscontext * pointer to the js context in which the exception was thrown.
...on success, *vp receives the current pending exception.
...And 2 more matches
Debug.setNonUserCodeExceptions - Archive of obsolete content
the debug.setnonusercodeexceptions property determines whether any try-catch blocks in this scope are to be treated by the debugger as user-unhandled.
... exceptions can be classified as thrown, user-unhandled or unhandled.
... syntax debug.setnonusercodeexceptions [= bool]; remarks if this property is set to true within a given scope, the debugger can then choose whether to take some specified action on exceptions thrown inside that scope: for instance, if the developer wishes to break on user-unhandled exceptions.
... (function () { debug.setnonusercodeexceptions = true; try{ var x = null; x.y(); } catch (e) { // catch the exception.
Components.Exception
summary components.exception is a javascript constructor to create nsixpcexception objects.
... these exception objects may be thrown when implementing xpcom interfaces in javascript, and they can provide better diagnostics in the error console if not caught than simply throwing an nsresult's value will.
... see also nsixpcexception.
... syntax var exception = [ new ] components.exception([ message [, result [, stack [, data ] ] ] ]); parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional data you might want to store, defaulting to null example throw components.exception("i am throwing an exception from a javascript xpcom component."); ...
IDBDatabaseException - Web APIs
obsolete: this interface was removed from the specification and was replaced by usage of domexception.
... in the indexeddb api, an idbdatabaseexception object represents exception conditions that can be encountered while performing database operations.
... message domstring error message describing the exception raised.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbdatabaseexception deprecatednon-standardchrome full support 12prefixed full support 12prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the ...
Exception - MDN Web Docs Glossary: Definitions of Web-related terms
an exception is a condition that interrupts normal code execution.
... in javascript syntax errors are a very common source of exceptions.
... learn more general knowledge exception handling on wikipedia ...
JSExceptionState
this is used to save and restore exception states.
... syntax struct jsexceptionstate; description a jsexceptionstate object is returned by the js_saveexceptionstate function, and is passed to functions js_restoreexceptionstate and js_dropexceptionstate.
... see also mxr id search for jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate ...
nsIException
xpcom/base/nsiexception.idlscriptable please add a summary to this article.
... inner nsiexception an inner exception that triggered this, if available.
... result nsresult the nsresult associated with this exception.
nsIXSLTException
content/xslt/public/nsixsltexception.idlscriptable please add a summary to this article.
... inherits from: nsiexception last changed in gecko 1.7 attributes attribute type description sourcenode nsidomnode the context node, may be null.
... stylenode nsidomnode the node in the stylesheet that triggered the exception.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
the code read-only property of the domexception interface returns a short that contains one of the error code constants, or 0 if none match.
...new dom exceptions don't use this anymore: they put this info in the domexception.name attribute.
... syntax var domexceptioncode = domexceptioninstance.code; value a short number.
FileException - Web APIs
in the file system api, a fileexception object represents error conditions that you might encounter while accessing the file system using the synchronous api.
... it extends the fileexception interface described in file writer and adds several new error codes.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfileexception deprecatednon-standardchrome no support 13 — 29prefixed no support 13 — 29prefixed prefixed implemented with the vendor prefix: webkitedge no support nofirefox no support noie no support noopera ...
XPathException.code - Web APIs
the code read-only property of the xpathexception interface returns a short that contains one of the error code constants.
... syntax var exceptioncode = exception.code; value a short number representing the error code.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
XPathException - Web APIs
in the dom xpath api the xpathexception interface represents exception conditions that can be encountered while performing xpath operations.
... properties xpathexception.code read only returns a short that contains one of the error code constants.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
nsIDOMFileException
the nsidomfileexception interface represents exceptions that can be raised by calls to the methods in the nsidomfile interface.
... content/base/public/nsidomfileexception.idlscriptable please add a summary to this article.
Breaking on exceptions - Firefox Developer Tools
to instruct the debugger to pause on an exception, tick these checkboxes in the breakpoints list: pause on exceptions pause on caught exceptions when an exception occurs, the line where it occurs is highlighted in the source pane, with a squiggly red line under the problematic code.
... a tooltip describes the exception.
DOMException.message - Web APIs
the message read-only property of the domexception interface returns a domstring representing a message or description associated with the given error name.
... syntax var domexceptionmessage = domexceptioninstance.message; value a domstring.
DOMException.name - Web APIs
WebAPIDOMExceptionname
the name read-only property of the domexception interface returns a domstring that contains one of the strings associated with an error name.
... syntax var domexceptionname = domexceptioninstance.name; value a domstring.
NPN_SetException - Archive of obsolete content
syntax #include <npruntime.h> void npn_setexception(npobject *npobj, const nputf8 *message); parameters the function has the following parameters: <tt>npobj</tt> the object on which the exception occurred.
nsIDOMXPathException
dom/interfaces/xpath/nsidomxpathexception.idlscriptable describes an exception resulting from xpath operations.
nsIXPConnect
void setdefaultsecuritymanager(in nsixpcsecuritymanager amanager, in pruint16 flags); nsixpcfunctionthistranslator setfunctionthistranslator(in nsiidref aiid, in nsixpcfunctionthistranslator atranslator); void setreportalljsexceptions(in boolean reportalljsexceptions); void setsafejscontextforcurrentthread(in jscontextptr cx); void setsecuritymanagerforjscontext(in jscontextptr ajscontext, in nsixpcsecuritymanager amanager, in pruint16 flags); void syncjscontexts(); void updatexows(in jscontextptr ajscontext, in nsixpconnectwrappednative aobject, in pruint32 away); native code only!
... deferreleasesuntilaftergarbagecollection prbool obsolete since gecko 1.9 pendingexception nsiexception constants constant value description init_js_standard_classes 1 << 0 flag_system_global_object 1 << 1 omit_components_object 1 << 2 xpc_xow_clearscope 1 tells updatexows() to clear the scope of all of the xows it finds.
... atracer missing description exceptions thrown missing exception missing description clearallwrappednativesecuritypolicies() void clearallwrappednativesecuritypolicies(); parameters none.
...And 37 more matches
imgIContainer
exceptions thrown ns_error_not_available if the animated state cannot be determined.
...in the case of any error, zero is returned, and an exception will be thrown.
...in the case of any error, zero is returned, and an exception will be thrown.
...And 34 more matches
WebIDL bindings
the signatures of the methods correspond to the signatures for throwing idl methods/getters/setters with an additional trailing "mozilla::dom::callbackobject::exceptionhandling aexceptionhandling" argument, defaulting to ereportexceptions.
... if areportexceptions is set to ereportexceptions, the methods will report js exceptions before returning.
... if areportexceptions is set to erethrowexceptions, js exceptions will be stashed in the errorresult and will be reported when the stack unwinds to wherever the errorresult was set up.
...And 32 more matches
LiveConnect Overview - Archive of obsolete content
for example, the following code also assigns the value "h" to the variable c: var c = new java.lang.character(72); handling java exceptions in javascript when java code fails at run time, it throws an exception.
... if your javascript code accesses a java data member or method and fails, the java exception is passed on to javascript for you to handle.
... beginning with javascript 1.4, you can catch this exception in a try...catch statement.
...And 27 more matches
Index - Web APIs
WebAPIIndex
the number of channels in the input must be between 0 and the maxchannelcount value or an exception is raised.
...this occurs when the underlying audioworkletprocessor behind the node throws an exception in its constructor, the process method, or any user-defined class method.
...if this css value doesn't contain a counter value, a domexception is raised.
...And 27 more matches
Index
24 js::autosaveexceptionstate jsapi reference, reference, référence(2), spidermonkey js::autosaveexceptionstate saves and later restores the current exception state of a given jscontext.
...the allocation will then be retried (and may still fail.) 68 js::setoutofmemorycallback jsapi reference, reference, référence(2), spidermonkey unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
... 89 jscheckaccessop jsapi reference, obsolete, reference, référence(2), spidermonkey check whether obj[id] may be accessed per mode, returning js_false on error/exception, js_true on success with obj[id]'s stored value in *vp.
...And 24 more matches
try...catch - JavaScript
the try...catch statement marks a block of statements to try and specifies a response should an exception be thrown.
... syntax try { try_statements } [catch (exception_var_1 if condition_1) { // non-standard catch_statements_1 }] ...
... [catch (exception_var_2) { catch_statements_2 }] [finally { finally_statements }] try_statements the statements to be executed.
...And 22 more matches
JSAPI User Guide
this causes a javascript exception to be thrown.
... the caller can catch the exception using a javascript try/catch statement.
... errors and exceptions the importance of checking the return value of jsapi functions, of course, goes without saying.
...And 21 more matches
Control flow and error handling - JavaScript
nanas are $0.48 a pound.'); break; case 'cherries': console.log('cherries are $3.00 a pound.'); break; case 'mangoes': console.log('mangoes are $0.56 a pound.'); break; case 'papayas': console.log('mangoes and papayas are $2.79 a pound.'); break; default: console.log(`sorry, we are out of ${fruittype}.`); } console.log("is there anything else you'd like?"); exception handling statements you can throw exceptions using the throw statement and handle them using the try...catch statements.
... throw statement try...catch statement exception types just about any object can be thrown in javascript.
...while it is common to throw numbers or strings as errors, it is frequently more effective to use one of the exception types specifically created for this purpose: ecmascript exceptions domexception and domerror throw statement use the throw statement to throw an exception.
...And 20 more matches
nsIMsgIncomingServer
exceptions thrown missing exception missing description cleartemporaryreturnreceiptsfilter() if sent folder pref is changed we need to clear the temporary return receipt filter so that the new return receipt filter can be recreated (by configuretemporaryreturnreceiptsfilter()).
...exceptions thrown missing exception missing description closecachedconnections() void closecachedconnections(); parameters none.
... exceptions thrown missing exception missing description configuretemporaryfilters() for mail, this configures both the mdn filter, and the server-side spam filter filters, if needed.
...And 16 more matches
nsIHttpChannel
exceptions thrown ns_error_failure if set after the channel has been opened.
...the implementation is not required to throw an exception when the referrer uri is rejected.
... exceptions thrown ns_error_in_progress if set after the channel has been opened.
...And 15 more matches
IDBObjectStoreSync - Web APIs
method overview any add (in any value, in optional any key) raises (idbdatabaseexception); idbindexsync createindex (in domstring name, in domstring storename, in domstring keypath, in optional boolean unique); any get (in any key) raises (idbdatabaseexception); idbcursorsync opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); idbindexsync openindex (in domstring name) raises (idbdatabase...
...exception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); void removeindex (in domstring indexname) raises (idbdatabaseexception); attributes attribute type description indexnames readonly domstringlist a list of the names of the indexes on this object store.
...if a record already exists with the given key, an exception is raised.
...And 13 more matches
nsIFile
exceptions thrown ns_error_file_not_directory indicates that this nsifile does not reference a directory.
... exceptions thrown ns_error_file_invalid_path indicates that this nsifile does not reference a symbolic link.
... exceptions thrown ns_error_file_unrecognized_path indicates that anode incorrectly contains a path separator character.
...And 12 more matches
IDBIndexSync - Web APIs
method overview any add (in any value, in optional any key) raises (idbdatabaseexception); any get (in any key) raises (idbdatabaseexception); any getobject (in any key) raises (idbdatabaseexception); void opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); void openobjectcursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); an...
...y put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); attributes attribute type description keypath readonly domstring the key path of this index.
...if a record already exists with the given key, an exception is raised.
...And 12 more matches
Debugger - Firefox Developer Tools
changing this flag when any frame of the debuggee is currently active on the stack will produce an exception.
... uncaughtexceptionhook either null or a function that spidermonkey calls when a call to a debug event handler, breakpoint handler, or similar function throws some exception, which we refer to asdebugger-exception here.
... exceptions thrown in the debugger are not propagated to debuggee code; instead, spidermonkey calls this function, passingdebugger-exception as its sole argument and the debugger instance as the this value.
...And 11 more matches
throw - JavaScript
the throw statement throws a user-defined exception.
... description use the throw statement to throw an exception.
... when you throw an exception, expression specifies the value of the exception.
...And 11 more matches
Bytecode Descriptions
code must not jump into or out of this region: control can enter only by executing jsop::iter and can exit only by executing a jsop::enditer or by exception unwinding.
...notable exceptions are arrow functions and derived or default class constructors.
...if resumekind is throw or return, these completions are handled by throwing an exception.
...And 10 more matches
nsIMsgHeaderParser
exceptions thrown missing exception missing description native code only!extractheaderaddressnames given a string which contains a list of header addresses, returns a comma-separated list of just the 'user name' portions.
... exceptions thrown missing exception missing description native code only!extractheaderaddressname like extractheaderaddressnames(), but only returns the first name in the list, if there is more than one.
... return value the first name found in the list exceptions thrown missing exception missing description makefulladdress() given an e-mail address and a person's name, concatenates them together into a single string, doing all the necessary quoting.
...And 10 more matches
Index
MozillaTechXPCOMIndex
18 components.exception xpcom:language bindings, xpconnect components.exception is a javascript constructor to create nsixpcexception objects.
... these exception objects may be thrown when implementing xpcom interfaces in javascript, and they can provide better diagnostics in the error console if not caught than simply throwing an nsresult's value will.
...it is meant for use by extension developers who have exception handler blocks which want to "eat" an exception, but still want to report it to the console.
...And 9 more matches
nsIDBFolderInfo
rvalue sorttype nsmsgviewsorttypevalue version unsigned long viewflags nsmsgviewflagstypevalue viewtype nsmsgviewtypevalue methods andflags() long andflags( in long flags ); parameters flags missing description return value missing description exceptions thrown missing exception missing description changeexpungedbytes() void changeexpungedbytes( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenummessages() void changenummessages( in long delta ); parameters delta missing description exceptions thrown m...
...issing exception missing description changenumunreadmessages() void changenumunreadmessages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description getbooleanproperty() boolean getbooleanproperty( in string propertyname, in boolean defaultvalue ); parameters propertyname missing description defaultvalue missing description return value missing description exceptions thrown missing exception missing description getcharacterset() void getcharacterset( out acstring charset, out boolean overriden ); parameters charset missing description overriden missing description exceptions thrown missing exception miss...
...ing description getcharactersetoverride() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void getcharactersetoverride( out boolean charactersetoverride ); parameters charactersetoverride missing description exceptions thrown missing exception missing description getcharptrcharacterset() string getcharptrcharacterset(); parameters none.
...And 9 more matches
nsIEffectiveTLDService
exceptions thrown ns_error_invalid_arg this exception is thrown if the hostname in auri is empty.
... ns_error_insufficient_domain_levels this exception is thrown if there were insufficient subdomain levels in the hostname to satisfy the requested aadditionalparts value.
... ns_error_host_is_ip_address this exception is thrown if auri is a numeric ipv4 or ipv6 address.
...And 9 more matches
JSAPI Cookbook
*/ js::callargs args = js::callargsfromvp(argc, vp); args.rval().setint32(23); return true; returning a floating-point number // javascript return 3.14159; /* jsapi */ js::callargs args = js::callargsfromvp(argc, vp); args.rval().setdouble(3.14159); exception handling throw the most common idiom is to create a new error object and throw that.
...note that javascript exceptions are not the same thing as c++ exceptions.
...use js_setpendingexception to throw an arbitrary js::value from c/c++.
...And 8 more matches
nsICrashReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void annotatecrashreport(in acstring key, in acstring data); void appendappnotestocrashreport(in acstring data); void appendobjcexceptioninfotoappnotes(in voidptr aexception); native code only!
... void writeminidumpforexception(in voidptr aexceptioninfo); native code only!
... exceptions thrown ns_error_not_initialized if crash reporting is not initialized.
...And 8 more matches
SVGTransformList - Web APIs
an svgtransformlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 8 more matches
Promise
this may be any value, including undefined, though it is generally an error object, like in exception handling.
...if the executor throws an exception, its value will be passed to the reject resolving function.
...although the reason can be undefined, it is generally an error object, like in exception handling.
...And 7 more matches
Task.jsm
task.spawn() returns a promise that is resolved when the task completes successfully, or is rejected if an exception occurs.
...if the promise is rejected, its rejection reason is thrown as an exception.
... method overview function async(atask); promise spawn(atask); properties attribute type description result read only constructor constructs a special exception that, when thrown inside a legacy generator function, allows the associated task to be resolved with a specific value.
...And 7 more matches
nsIOutputStream
exceptions thrown ns_base_stream_would_block indicates that closing the output stream would block the calling thread for an indeterminate amount of time.
... this exception may only be thrown if isnonblocking() returns true.
... exceptions thrown ns_base_stream_would_block indicates that flushing the output stream would block the calling thread for an indeterminate amount of time.
...And 7 more matches
nsIZipWriter
attempting to perform a synchronous operation on the interface while the background queue is in progress will throw an ns_error_in_progress exception.
... exceptions thrown ns_error_not_initialized if no zip file has been opened.
... exceptions thrown ns_error_not_initialized no zip file is open.
...And 7 more matches
IDBDatabaseSync - Web APIs
method overview idbobjectstoresync createobjectstore (in domstring name, in domstring keypath, in optional boolean autoincrement) raises (idbdatabaseexception); idbobjectstoresync openobjectstore (in domstring name, in optional unsigned short mode) raises (idbdatabaseexception); void removeobjectstore (in domstring storename) raises (idbdatabaseexception); void setversion (in domstring version); idbtransactionsync transaction (in optional domstringlist storenames, in optional unsigned int timeout) raises (idbdatabas...
...eexception); attributes attribute type description description readonly domstring the human-readable description of the connected database.
... idbobjectstoresync createobjectstore( in domstring name, in domstring keypath, in optional boolean autoincrement ) raises (idbdatabaseexception); parameters name the name of a new object store.
...And 7 more matches
SVGLengthList - Web APIs
an svglengthlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 7 more matches
SVGNumberList - Web APIs
an svgnumberlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 7 more matches
SVGPointList - Web APIs
an svgpointlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 7 more matches
SVGStringList - Web APIs
an svgstringlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 7 more matches
FileSystemEntrySync - Web APIs
method overview metadata getmetadata () raises (fileexception); filesystementrysync moveto (in directoryentrysync parent, optional domstring newname) raises (fileexception); filesystementrysync copyto(in directoryentrysync parent, optional domstring newname) raises (fileexception); domstring tourl(); void remove() raises (fileexception); directoryentrysync getparent(); attributes attribute typ...
...[ todo: specify what kind of metadata ] metadata getmetada () raises (fileexception); parameter none returns metadata exceptions this method can raise a fileexception with the following codes: exception description not_found_err the entry does not exist.
... filesystementrysync moveto ( in directoryentrysync parent, optional domstring newname ) raises (fileexception); parameters parent the directory to which to move the entry.
...And 6 more matches
SVGPathSegList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
...And 6 more matches
Python binding for NSS
python-nss follows the existing python exception mechanism.
... any error reported by nss/nspr is converted into a python exception and raised.
... the exact error code, error description, and often contextual error information will be present in the exception object.
...And 5 more matches
Shell global objects
on (default: false) filename filename for error messages and debug info linenumber starting line number for error messages and debug info columnnumber starting column number for error messages and debug info global global in which to execute the code newcontext if true, create and use a new cx (default: false) catchtermination if true, catch termination (failure without an exception value, as for slow scripts or out-of-memory) and return 'terminated' element if present with value v, convert v to an object o and mark the source as being attached to the dom element o.
...if an error occurred, throw the appropriate exception; otherwise, run the script and return its value.
...if an error occurred, throw the appropriate exception; otherwise, return the module object timeout([seconds], [func]) get/set the limit in seconds for the execution time for the current context.
...And 5 more matches
nsIRadioInterfaceLayer
connecting 9 call_state_disconnected 10 call_state_incoming 11 datacall_state_unknown 0 datacall_state_connecting 1 datacall_state_connected 2 datacall_state_disconnecting 3 datacall_state_disconnected 4 call_state_ringing 2 obsolete since gecko 14.0 methods answercall() void answercall( in unsigned long callindex ); parameters callindex missing description exceptions thrown missing exception missing description deactivatedatacall() void deactivatedatacall( in domstring cid, in domstring reason ); parameters cid missing description reason missing description exceptions thrown missing exception missing description dial() functionality for making and managing phone calls.
... void dial( in domstring number ); parameters number missing description exceptions thrown missing exception missing description enumeratecalls() will continue calling callback.enumeratecallstate until the callback returns false.
... void enumeratecalls( in nsiriltelephonycallback callback ); parameters callback missing description exceptions thrown missing exception missing description getdatacalllist() void getdatacalllist(); parameters none.
...And 5 more matches
nsITextInputProcessor
if the key attribute value is not a registered key name, this flag causes throwing an exception.
... therefore, this can prevent non-printable key events to cause dispatching as printable keyboard events and you can detect the registered key name change from the thrown exception.
...if this is specified with non-zero location attribute value, this causes throwing an exception since it doesn't make sense.
...And 5 more matches
Debugger.Frame - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its debugger.frame instances, without worrying about interfering with other debuggers.) when the debuggee pops a stack frame (say, because a function call has returned or an exception has been thrown from it), the debugger.frame instance referring to that frame becomes inactive: its live property becomes false, and accessing its other properties or calling its methods throws an exception.
... when the debuggee code completes, whether by returning, throwing an exception or being terminated, pop the "debugger" frame, and return an appropriate completion value from the invocation function to the debugger.
...in frames returning or throwing an exception, the location is often a return or a throw statement.
...And 5 more matches
Debugger.Object - Firefox Developer Tools
if the referent is not a promise, throw a typeerror exception.
...if the referent is not a promise, throw a typeerror exception.
...if the referent is not a promise, throw a typeerror exception.
...And 5 more matches
CSSPrimitiveValue - Web APIs
there is one exception for color percentage values: since a color percentage value is relative to the range 0-255, a color percentage value can be converted to a number (see also the rgbcolor interface).
...if this css value doesn't contain a counter value, a domexception is raised.
...if this css value doesn't contain a float value or can't be converted into the specified unit, a domexception is raised.
...And 5 more matches
DirectoryEntrySync - Web APIs
var direntry = fs.root.getdirectory('superseekrit', {create: true}); method overview directoryreadersync createreader () raises (fileexception); fileentrysync getfile (in domstring path, in optional flags options) raises (fileexception); directoryentrysync getdirectory (in domstring path, in optional flags options) raises (fileexception); void removerecursively () raises (fileexception); methods createreader() creates a new directoryreadersync to read entries from this directory.
... directoryreadersync createreader ( ) raises (fileexception); returns directoryreadersync represents a directory in a file system.
... parameter none exceptions this method can raise a fileexception with the following codes: exception description not_found_err the directory does not exist.
...And 5 more matches
Operable - Accessibility
to achieve aaa conformance, all functionality should be accessible using keyboard controls — with no exceptions.
... exceptions to this are activities with time limits longer than 20 hours, real time events (e.g.
...exceptions are where the link purpose is ambiguous to all users (see ambiguous to users in general for a useful explanation of this).
...And 5 more matches
Preferences - Archive of obsolete content
if there's a value of the wrong type and the preference is not locked, an ns_error_unexpected exception is thrown.
... if there's a value of the expected type in the default tree, it is returned (with the only exception being that calling getcomplexvalue() with atype parameter specified as nsipreflocalizedstring, described above).
... otherwise an ns_error_unexpected exception is thrown.
...And 4 more matches
Index - Archive of obsolete content
433 exception logging in javascript extensions, extensions:tools, guide, javascript, javascript:tools, tools, web development, web development:tools in versions of firefox prior to firefox 3, all javascript exceptions were always logged into the error console if they remained unhandled at the time execution returned back into c++ code.
... as a result, if, for example, c++ code called a javascript component, which threw an exception, that exception would be logged to the console before control was returned to the c++ caller.
...this content will be copied for each matching result (though see below for an exception) and inserted into the document.
...And 4 more matches
nsIAccessibleEditableText
exceptions thrown ns_error_failure indicates the text cannot be copied into the clipboard.
... exceptions thrown ns_error_failure indicates the text cannot be deleted or copied into the clipboard.
... exceptions thrown ns_error_failure indicates the text cannot be deleted.
...And 4 more matches
nsIContentPrefService
exceptions thrown ns_error_illegal_value if agroup is not a string, nsiuri, or null.
...exceptions thrown ns_error_illegal_value if agroup is not a string, nsiuri, or null.
...exceptions thrown ns_error_illegal_value if aname is null or an empty string.
...And 4 more matches
nsIControllers
exceptions thrown ns_error_out_of_memory getcontrollerat() returns the controller instance at the given position.
...exceptions thrown ns_error_failure the given index is out of range.
...exceptions thrown ns_error_failure the id is greater than the number of controllers that have been inserted, or the controller has since been removed.
...And 4 more matches
nsIFaviconService
throws an exception if we don't have data.
... exceptions thrown ns_error_not_available thrown when we have never heard of this favicon url.
... this method retrieves the given favicon data, returning it as a data url throws an exception if we don't have data.
...And 4 more matches
nsIScriptableIO
exceptions thrown ns_error_invalid_arg alocation was null.
...exceptions thrown ns_error_invalid_arg afilepath was null.
...exceptions thrown ns_error_invalid_arg auri was null.
...And 4 more matches
SVGAngle - Web APIs
WebAPISVGAngle
an svgangle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only attribute, or when the object itself is read-only.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read-only attribute, or when the object itself is read-only.
...And 4 more matches
SVGLength - Web APIs
WebAPISVGLength
an svglength object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a read only attribute or when the object itself is read only.
...And 4 more matches
SVGTransform - Web APIs
an svgtransform object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a read only attribute or when the object itself is read only.
...And 4 more matches
Feature-Policy - HTTP
when this policy is disabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception.
...when this policy is disabled, the promise returned by navigator.getbattery() will reject with a notallowederror domexception.
...when this policy is disabled, the promise returned by getusermedia() will reject with a notallowederror domexception.
...And 4 more matches
test/assert - Archive of obsolete content
throws(block, error, message) assert that a block of code throws the expected exception.
... this method takes an optional error argument: to check that the exception thrown is of the expected type, pass a constructor function: the exception thrown must be an instance of the object returned by that function.
... to check that the exception thrown contains a specific message, pass a regular expression here: the message property of the exception thrown must match the regular expression for example, suppose we define two different custom exceptions: function myerror(message) { this.name = "myerror"; this.message = message || "default message"; } myerror.prototype = new error(); myerror.prototype.constructor = myerror; function anothererror(message) { this.name = "anothererror"; this.message = message || "default message"; console.log(this.message); } anothererror.prototype = new error(); anothererror.prototype.constructor = anothererror; we can check the type of exception by passing a function as the error argument: exports["test exception type 1 expected to pass"] = function(asse...
...And 3 more matches
Storage access policy: Block cookies from trackers
dom storage: localstorage: window.localstorage: read and write attempts throw a securityerror exception.
...thus, attempts to read and write using this object will throw a typeerror exception.
... indexeddb: attempting to access the indexeddb factory object throws a securityerror exception.
...And 3 more matches
Web Replay
diffs are computed by first setting up an exception handler thread (mac only) very similar to the one used by asm.js.
... when taking the first snapshot all addressable memory in the process is enumerated and write-protected, and as faults occur a special exception handler thread unprotects the memory, copies its contents and marks it as dirty.
... there is an exception to this, for scripts and script source objects; debug objects for these will continue to hold the same referent after resuming or rewinding the replaying process.
...And 3 more matches
An Overview of XPCOM
in c++, you can use a fairly advanced feature known as a dynamic_cast<>, which throws an exception if the shape object is not able to be cast to a circle.
... but enabling exceptions and rtti may not be an option because of performance overhead and compatibility on many platforms, so xpcom does things differently.
... exceptions in xpcom c++ exceptions are not supported directly by xpcom.
...And 3 more matches
nsIAccessNode
, in domstring propertyname); domstring getcomputedstylevalue(in domstring pseudoelt, in domstring propertyname); void scrollto(in unsigned long ascrolltype); void scrolltopoint(in unsigned long acoordinatetype, in long ax, in long ay); attributes note: attempting to access the attributes of a node that is unattached from the accessible tree will result in an exception - ns_error_failure.
... exceptions thrown ns_error_failure indicates that the access node is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the access node is unattached from the accessible tree.
...And 3 more matches
nsIDownloadManager
exceptions thrown ns_error_failure the download is not in progress.
... exceptions thrown ns_error_not_available the download is not in the database.
... exceptions thrown ns_error_failure the download is not in progress.
...And 3 more matches
nsIInputStream
a stream that is closed will throw an exception when this method is called.
... exceptions thrown <other-error> if the stream is closed due to some error condition.
... exceptions thrown <other-error> on failure.
...And 3 more matches
nsIURI
exceptions thrown ns_error_failure if host is not applicable to the uri scheme (e.g.
... exceptions thrown ns_error_failure if hostport is not applicable to the uri scheme (e.g.
... exceptions thrown ns_error_failure if password is not applicable to the uri scheme (e.g.
...And 3 more matches
HTMLTableElement - Web APIs
when set, if the object doesn't represent a <caption>, a domexception with the hierarchyrequesterror name is thrown.
...when set, if the object doesn't represent a <thead>, a domexception with the hierarchyrequesterror name is thrown.
...when set, if the object doesn't represent a <tfoot>, a domexception with the hierarchyrequesterror name is thrown.
...And 3 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
exceptions the following exceptions are reported to the rejection handler for the promise returned by setremotedescription(): invalidaccesserror the content of the description is invalid.
...for example, if the type is rollback and the signaling state is one of stable, have-local-pranswer, or have-remote-pranswer, this exception is thrown, because you can't roll back a connection that's either fully established or is in the final stage of becoming connected.
...this happens instead of throwing an exception, thereby reducing the number of potential errors which might occur, and simplifies the processing you need to do when you receive an offer, by eliminating the need to handle the offer/answer process differently depending on whether the local peer is the caller or callee.
...And 3 more matches
/loader - Archive of obsolete content
any attempt to load a module not listed in the manifest is unauthorized and is rejected with an exception: let { loader } = require('toolkit/loader'); let manifest = { './main': { 'requirements': { 'panel': 'sdk/panel' } }, 'sdk/panel': { 'requirements': { 'chrome': 'chrome' } } 'chrome': { 'requirements': {} } }; let loader = loader({ resolve: function(id, requirer) { let requirements = manifest[requirer].requirements; if (id in manifest) ...
...return requirements[id]; else throw error('module "' + requirer + '" has no authority to require ' + 'module "' + id + "') } }); thrown exceptions will propagate to the caller of require().
... if the function assigned to resolve does not return a string value, an exception will still be thrown as the loader will be unable to resolve the required module's location.
...And 2 more matches
console/traceback - Archive of obsolete content
see nsiexception for more information.
... globals functions fromexception(exception) attempts to extract the traceback from exception.
... parameters exception : exception exception where exception is an nsiexception.
...And 2 more matches
console - Archive of obsolete content
console methods all console methods except exception() and trace() accept one or more javascript objects as arguments and log them to the console.
... console.error(object[, object, ...]) logs the arguments to the console, preceded by "error:" and the name of your add-on: console.error("this is an error message"); error: my-addon: this is an error message console.exception(exception) logs the given exception instance as an error, outputting information about the exception's stack traceback if one is available.
... try { dothing(); } catch (e) { console.exception(e); } function userexception(message) { this.message = message; this.name = "userexception"; } function dothing() { throw new userexception("thing could not be done!"); } error: my-addon: an exception occurred.
...And 2 more matches
Venkman Introduction - Archive of obsolete content
these commands should be self explanatory, with the possible exception of stop, which causes the debugger to stop when the next line of javascript is executed, and the profile button, which can be used to measure execution times for your scripts.
...you can also use commands available in the debug menu and from the console to stop at errors or at exceptions.
...if a property shows up in a bold red font, an exception occurred when venkman tried to read the value.
...And 2 more matches
Creating JavaScript jstest reftests
if they're not, throw an exception (which will cause the test to fail).
... reportcompare reportcompare(expected, actual, description) is somewhat like asserteq(actual, expected, description) except that the first two arguments are swapped, failures are reported via stdout rather than by throwing exceptions, and the matching is fuzzy in an unspecified way.
...in the javascript shell, an uncaught exception or out of memory error will terminate the shell with an exit code of 3.
...And 2 more matches
mozIStorageConnection
exceptions thrown ns_error_unexpected thrown if the method was called on a thread other than the one that opened the connection.
... note: the database engine does not support nested transactions, so attempting to start a transaction when one is already active will throw an exception.
... exceptions thrown ns_error_unexpected the connection is to a memory database.
...And 2 more matches
nsIAccessibleHyperLink
note: renamed from anchors in gecko 1.9 exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
...And 2 more matches
nsIArray
exceptions thrown ns_error_failure if the array is empty (to make it easy to detect errors).
...note that since null is a valid input, exceptions are used to indicate that an element is not found.
...exceptions thrown ns_error_failure if the element was not in the array.
...And 2 more matches
nsICryptoHash
exceptions thrown ns_error_not_initialized indicates that init() or initwithstring() has not been called.
... exceptions thrown ns_error_invalid_arg indicates that an unsupported algorithm type was passed initwithstring() initialize the hashing object.
... exceptions thrown ns_error_invalid_arg indicates that an unsupported algorithm type was passed update() adds an array of data to be hashed to the object.
...And 2 more matches
nsIIOService
exceptions thrown ns_error_malformed_uri if url string is not of the right form.
...the only exception to this is for loads from webworkers since they don't have any nodes to be passed as aloadingnode.
...the only exception to this is for loads from webworkers since they don't have any nodes to be passed as aloadingnode.
...And 2 more matches
nsILivemarkService
exceptions thrown ns_error_invalid_arg if the folder id isn't known or identifies a folder that isn't a livemark container.
... exceptions thrown ns_error_invalid_arg if the folder id isn't known or identifies a folder that isn't a livemark container.
... exceptions thrown ns_error_invalid_arg if the folder id isn't known.
...And 2 more matches
nsINavHistoryContainerResultNode
vhistoryresultnode findnodebydetails(in autf8string auristring, in prtime atime, in long long aitemid, in boolean arecursive); nsinavhistoryresultnode getchild(in unsigned long aindex); unsigned long getchildindex(in nsinavhistoryresultnode anode); attributes attribute type description childcount unsigned long the number of child nodes; accessing this throws an ns_error_not_available exception of containeropen is false.
...accessing this throws an exception if the node isn't a dynamic container.
...exceptions thrown ns_error_not_available the container is not open.
...And 2 more matches
Component; nsIPrefBranch
remarks note: prior to gecko 6.0, this method would throw an exception if there was no user value set for the specified preference.
... adefaultvalue requires gecko 54 optional - a default value to use if the preference does not exist (instead of throwing an exception).
... adefaultvalue requires gecko 54 optional - a default value to use if the preference does not exist (instead of throwing an exception).
...And 2 more matches
Int64
exceptions thrown typeerror the specified value cannot be converted into a 64-bit integer.
... exceptions thrown typeerror one or both of the specified values is not a 64-bit integer (either signed or unsigned).
... exceptions thrown typeerror num is not a 64-bit integer object.
...And 2 more matches
UInt64
exceptions thrown typeerror the specified value cannot be converted into a 64-bit integer.
... exceptions thrown typeerror one or both of the specified values is not a 64-bit integer (either signed or unsigned).
... exceptions thrown typeerror num is not a 64-bit integer object.
...And 2 more matches
FileEntrySync - Web APIs
method overview filewritersync createwriter () raises (fileexception); file file () raises (fileexception); methods createwriter() creates a new filewriter associated with the file that the fileentry represents.
... void createwriter ( ) raises (fileexception); parameter none.
... returns filewritersync exceptions this method can raise a fileexception with the following codes: exception description not_found_err the file does not exist.
...And 2 more matches
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
...it's an exception type for creating stores and indexes.
... in addition to the error codes sent to the idbrequest object, asynchronous operations can also raise exceptions.
...And 2 more matches
IDBTransactionSync - Web APIs
method overview void abort() raises (idbdatabaseexception); void commit() raises (idbdatabaseexception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabaseexception); attributes attribute type description db idbdatabasesync the database connection that this transaction is associated with.
... void abort( ) raises (idbdatabaseexception); exceptions this method can raise an idbdatabaseexception with the following code: non_transient_err if this transaction has already been committed or aborted.
... void commit( ) raises (idbdatabaseexception); exceptions this method can raise an idbdatabaseexception with the following codes: non_transient_err if this transaction has already been committed or aborted.
...And 2 more matches
XPathEvaluator.evaluate() - Web APIs
exceptions invalid_expression_err if the expression is not legal according to the rules of the xpathevaluator, an xpathexception of type invalid_expression_err is raised.
... type_err in case result cannot be converted to the specified type, an xpathexception of type type_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
...And 2 more matches
XPathExpression.evaluate() - Web APIs
exceptions invalid_expression_err if the expression is not legal according to the rules of the xpathevaluator, an xpathexception of type invalid_expression_err is raised.
... type_err in case result cannot be converted to the specified type, an xpathexception of type type_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
...And 2 more matches
Index - HTTP
WebHTTPHeadersIndex
with a few exceptions, policies mostly involve specifying server origins and script endpoints.
...when this policy is enabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception.
...when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception.
...And 2 more matches
handler.setPrototypeOf() - JavaScript
examples if you want to disallow setting a new prototype for your object, your handler's setprototypeof() method can either return false, or it can throw an exception.
... approach 1: returning false this approach means that any mutating operation that throws an exception on failure to mutate, must create the exception itself.
... if the mutation is performed by an operation that doesn't ordinarily throw in case of failure, such as reflect.setprototypeof(), no exception will be thrown.
...And 2 more matches
core/promise - Archive of obsolete content
in the add-on sdk we follow commonjs promises/a specification and model a promise as an object with a then method, which can be used to get the eventual return (fulfillment) value or thrown exception (rejection): foo().then(function success(value) { // ...
...since a function can either return a value or throw an exception, only one handler will ever be called.
... if handler throws an exception, bar will be rejected with it.
...tion(data) { return writeasync(json.url, data); }); }); in general, nesting is useful for computing values from more than one promise: function eventualadd(a, b) { return a.then(function (a) { return b.then(function (b) { return a + b; }); }); } var c = eventualadd(aasync(), basync()); error handling one sometimes-unintuitive aspect of promises is that if you throw an exception in the value handler, it will not be be caught by the error handler.
io/byte-streams - Archive of obsolete content
if the stream is already closed, an exception is thrown.
...if the stream is closed, an exception is thrown.
...if the stream is already closed, an exception is thrown.
...if the stream is closed, an exception is thrown.
io/text-streams - Archive of obsolete content
if the stream is closed, an exception is thrown.
...if the stream is already closed, an exception is thrown.
...if the stream is closed, an exception is thrown.
...if the stream is already closed, an exception is thrown immediately.
XPCOM Objects - Archive of obsolete content
trying to access methods or attributes without having the right interface set will result in an exception being thrown.
... passing parameters passing parameters to xpcom methods is no different from other js objects, with some exceptions.
... const cc = components.classes; const ci = components.interfaces; const cr = components.results; const ce = components.exception; you should be familiar with this already, although there are a couple of additions, components.results and components.exception.
...tes must have the same names as their idl counterparts, and that the queryinterface method is implemented: queryinterface : function(aiid) { if (!aiid.equals(ci.xsihellocounter) && !aiid.equals(ci.nsisupports)) { throw cr.ns_error_no_interface; } return this; } the method is very simple, it validates that the caller is requesting a supported interface, otherwise it throws an exception.
Beginning our React todo list - Learn web development
</label> </h2> <input type="text" id="new-todo-input" classname="input input__lg" name="text" autocomplete="off" /> <button type="submit" classname="btn btn__primary btn__lg"> add </button> </form> <div classname="filters btn-group stack-exception"> <button type="button" classname="btn toggle-btn" aria-pressed="true"> <span classname="visually-hidden">show </span> <span>all</span> <span classname="visually-hidden"> tasks</span> </button> <button type="button" classname="btn toggle-btn" aria-pressed="false"> <span classname="visually-hidden">show </span> <span>active<...
... <button type="button" classname="btn toggle-btn" aria-pressed="false"> <span classname="visually-hidden">show </span> <span>completed</span> <span classname="visually-hidden"> tasks</span> </button> </div> <h2 id="list-heading"> 3 tasks remaining </h2> <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button type="button" classname="btn">...
... further down, you can find our <ul> element: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > the role attribute helps assistive technology explain what kind of element a tag represents.
... clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack-large > * + * { margin-top: 2.5rem; } @media screen and (min-width: 550px) { .stack-small > * + * { margin-top: 1.4rem; } .stack-large > * + * { margin-top: 2.8rem; } } .stack-exception { margin-top: 1.2rem; } /* end global styles */ .todoapp { background: #fff; margin: 2rem 0 4rem 0; padding: 1rem; position: relative; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 2.5rem 5rem 0 rgba(0, 0, 0, 0.1); } @media screen and (min-width: 550px) { .todoapp { padding: 4rem; } } .todoapp > * { max-width: 50rem; margin-left: auto; margin-right: auto; } .todoapp > fo...
NetUtil.jsm
exceptions thrown this method throws an exception with the message "must have a source and a sink" if either asource or asink is null.
... exceptions thrown this method throws an exception with the message "must have a source and a callback" if either asource or acallback is null.
... exceptions thrown this method throws an exception with the message "must have a non-null string spec or nsifile object" and result code ns_error_invalid_arg if aspec is null.
... exceptions thrown ns_error_invalid_arg the specified stream is not an nsiinputstream.
JSErrorReport
jsreport_exception an exception is being raised.
... a jserrorreporter might choose to ignore a jserrorreport that has this flag set, since the exception may be caught and handled by javascript code.
... jsreport_is_exception(flags) returns true if flags has jsreport_exception.
... see also mxr id search for jserrorreport js_reporterror js_reportwarning js_reportoutofmemory js_seterrorreporter js_reporterrornumber js_reporterrornumberuc js_reporterrorflagsandnumber js_reporterrorflagsandnumberuc js_reportpendingexception ...
nsIComponentManager
exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
... exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
... exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
... exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
nsIContentViewer
void init( in nsiwidgetptr aparentwidget, [const] in nsintrectref abounds ); parameters aparentwidget missing description abounds missing description loadcomplete() void loadcomplete( in unsigned long astatus ); parameters astatus missing description exceptions thrown missing exception missing description loadstart() void loadstart( in nsisupports adoc ); parameters adoc missing description exceptions thrown missing exception missing description move() void move( in long ax, in long ay ); parameters ax missing description ay missing description open() attaches the content viewer to its dom window ...
... pagehide() void pagehide( in boolean isunload ); parameters isunload missing description exceptions thrown missing exception missing description permitunload() determins whether or not the document wants to prevent unloading by firing beforeunload on the document, and if it does, prompts the user.
...return value missing description exceptions thrown missing exception missing description resetclosewindow() works in tandem with permitunload(), if the caller decides not to close() the window it indicated it will, it is the caller's responsibility to reset that with this method.
...exceptions thrown missing exception missing description native code only!setbounds void setbounds( [const] in nsintrectref abounds ); parameters abounds missing description native code only!setdocumentinternal note: prior to gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7), this attribute was part of nsidocumentviewer.
nsICryptoHMAC
exceptions thrown ns_error_not_initialized if init() has not been called.
...to create the key object use for instance: var keyobject = components.classes["@mozilla.org/security/keyobjectfactory;1"] .getservice(components.interfaces.nsikeyobjectfactory) .keyfromstring(components.interfaces.nsikeyobject.hmac, rawkeydata); exceptions thrown ns_error_invalid_arg if an unsupported algorithm type is passed.
... exceptions thrown ns_error_not_initialized if init() has not been called.
... exceptions thrown ns_error_not_initialized if init() has not been called.
nsIDOMMozNetworkStatsManager
if the filtering start date is greater than the end date, an exception is thrown.
... exceptions thrown ns_error_invalid_arg the filtering start date is greater than the end date.
... exceptions thrown invalidnetwork the network must be in the return of getavailablenetworks.
... exceptions thrown invalidnetwork the network must be in the return of getavailablenetworks.
nsIDOMNSHTMLDocument
execcommandshowhelp() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) this method never did anything but throw an exception, and was removed entirely in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11).
... return value this method is not supported and always throws an exception.
... querycommandtext() obsolete since gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) this method never did anything but throw an exception, and was removed entirely in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11).
... return value this method is not supported and always throws an exception.
nsIHttpChannelInternal
this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive attribute is false.
...this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive attribute is false.
...this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive attribute is false.
...this may throw an ns_error_not_available exception if accessed when the channel's endpoints haven't been determined yet, or any time the nsihttpactivityobserver.isactive attribute is false.
nsIHttpServer
* handler; this path must not include a query string or hash component; it * also should usually be canonicalized, since most browsers will do so * before sending otherwise-matching requests * @param handler * an object which will handle any requests for the given path, or null to * remove any existing handler; if while the server is running the handler * throws an exception while responding to a request, an http 500 response * will be returned * @throws ns_error_invalid_arg * if path does not begin with a "/" */ void registerpathhandler(in string path, in nsihttprequesthandler handler); /** * registers a custom prefix handler.
... * @param handler * an object which will handle any requests for the given path, or null to * remove any existing handler; if while the server is running the handler * throws an exception while responding to a request, an http 500 response * will be returned * @throws ns_error_invalid_arg * if path does not begin with a "/" or does not end with a "/" */ void registerprefixhandler(in string prefix, in nsihttprequesthandler handler); /** * registers a custom error page handler.
... if the handler throws an * exception during server operation, fallback is to the genericized error * handler (the x00 version), then to 500, using a user-defined error * handler if one exists or the server default handler otherwise.
... * * @param handler * an object which will handle any requests for directories which * do not contain index pages, or null to reset to the default * index handler; if while the server is running the handler * throws an exception while responding to a request, an http 500 * response will be returned.
nsILocalFile
exceptions thrown ns_error_file_unrecognized_path indicates that relativefilepath incorrectly begins with a path separator character or otherwise contains invalid characters.
... exceptions thrown ns_error_file_unrecognized_path indicates that relativefilepath incorrectly begins with a path separator character or otherwise contains invalid characters.
... exceptions thrown ns_error_file_unrecognized_path indicates that filepath is not an absolute file path or that it contains characters that are invalid for the filesystem.
... exceptions thrown ns_error_file_unrecognized_path indicates that filepath is not an absolute file path or that it contains characters that are invalid for the filesystem.
nsIPrincipal
constant value description enable_denied 1 enable_unknown 2 enable_with_user_permission 3 enable_granted 4 methods native code only!canenablecapability short canenablecapability( in string capability ); parameters capability missing description return value missing description exceptions thrown missing exception missing description checkmayload() checks whether this principal is allowed to load the network resource located at the given uri under the same-origin policy.
... exceptions thrown ns_error_dom_bad_uri the load is not permitted.
... native code only!iscapabilityenabled boolean iscapabilityenabled( in string capability, in voidptr annotation ); parameters capability missing description annotation missing description return value missing description exceptions thrown missing exception missing description native code only!revertcapability void revertcapability( in string capability, inout voidptr annotation ); parameters capability missing description annotation missing description exceptions thrown missing exception missing description native code only!setcanenablecapability void setcanenablecapability( in ...
...string capability, in short canenable ); parameters capability missing description canenable missing description exceptions thrown missing exception missing description subsumes() returns whether the other principal is equal to or weaker than this principal.
nsIScriptableInputStream
exceptions thrown ns_base_stream_closed if called after the stream has been closed.
...exceptions thrown ns_error_not_initialized if init() was not called.
...this exception may only be thrown if nsiinputstream.isnonblocking() returns true.
...exceptions thrown ns_error_failure if there are not enough bytes available to read acount amount of data.
nsIServiceManager
exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
... exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
... exceptions thrown ns_error_service_not_available indicates that the service hasn't been instantiated.
... exceptions thrown ns_error_service_not_available indicates that the service hasn't been instantiated.
XPCOM Interface Reference
eporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindow...
...idomnavigatordesktopnotificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsidomstoragewindownsidomuserdatahandlernsidomwindownsidomwindow2nsidomwindowinternalnsidomwindowutilsnsidomxpathevaluatornsidomxpathexceptionnsidomxpathexpressionnsidomxpathresultnsidomxulcontrolelementnsidomxulelementnsidomxullabeledcontrolelementnsidomxulselectcontrolelementnsidomxulselectcontrolitemelementnsidatasignatureverifiernsidebugnsidebug2nsidevicemotionnsidevicemotiondatansidevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiter...
...sslistenernsidownloadernsidragdrophandlernsidragservicensidragsessionnsidroppedlinkhandlernsidroppedlinkitemnsidynamiccontainernsieditornsieditorboxobjectnsieditordocshellnsieditorimesupportnsieditorloggingnsieditormailsupportnsieditorobservernsieditorspellchecknsieffectivetldservicensienumeratornsienvironmentnsierrorservicensieventlistenerinfonsieventlistenerservicensieventsourcensieventtargetnsiexceptionnsiextensionmanagernsiexternalhelperappservicensiexternalprotocolservicensiexternalurlhandlerservicensiftpchannelnsiftpeventsinknsifactorynsifavicondatacallbacknsifaviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifeedprocessornsifeedprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsif...
...inapphelpernsiwintaskbarnsiwindowcreatornsiwindowmediatornsiwindowwatchernsiwindowsregkeynsiwindowsshellservicensiworkernsiworkerfactorynsiworkerglobalscopensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsm...
ArrayType
exceptions thrown typeerror type is not a ctype, or type.size is undefined.if the length is specifed but if it is not a valid one,then it is also thrown rangeerror the size of the resulting array can't be represented as both a size_t and as a javascript number.
... exceptions thrown typeerror length is not provided for unsized array, or is provided for sized array.
...this will throw a typeerror exception if the value can't be converted.
...if this value isn't a valid javascript number that's also a valid index into the array, a typeerror exception is thrown.
StructType
exceptions thrown typeerror the name is not a string, or one or more of the fields does not have a defined size.
... exceptions thrown error fields are not yet defined.
...this will throw a typeerror exception if the value can't be converted.
... exceptions thrown typeerror name is not a javascript string, or doesn't name a member field of the structure.
Web Console remoting - Firefox Developer Tools
the pageerror packet is: { "from": "conn0.console9", "type": "pageerror", "pageerror": { "errormessage": "referenceerror: foo is not defined", "sourcename": "http://localhost/~mihai/mozilla/test.js", "linetext": "", "linenumber": 6, "columnnumber": 0, "category": "content javascript", "timestamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity.
... the response packet: { "from": "conn0.console9", "input": "document", "result": { "type": "object", "classname": "htmldocument", "actor": "conn0.consoleobj20" "extensible": true, "frozen": false, "sealed": false }, "timestamp": 1347306273605, "exception": null, "exceptionmessage": null, "helperresult": null } exception holds the json-ification of the exception thrown during evaluation.
... exceptionmessage holds the exception.tostring() result.
... in firefox 23: we renamed the error and errormessage properties to exception and exceptionmessage respectively, to avoid conflict with the default properties used when protocol errors occur.
AudioNode.disconnect() - Web APIs
if no matching connection is found, an invalidaccesserror exception is thrown.
...if this parameter is out-of-bound, an indexsizeerror exception is thrown.
... if this parameter is out-of-bound, an indexsizeerror exception is thrown.
... exceptions indexsizeerror a value specified for input or output is invalid, referring to a node which doesn't exist or outside the permitted range.
Cache - Web APIs
WebAPICache
the code handles exceptions thrown from the fetch() operation.
... note that an http error response (e.g., 404) will not trigger an exception.
... return response; }); }).catch(function(error) { // this catch() will handle exceptions that arise from the match() or fetch() operations.
...404) will not trigger an exception.
HTMLInputElement - Web APIs
(if you set this to a negative number, an exception will be thrown.) min string: returns / sets the element's min attribute, containing the minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value.
...(if you set this to a negative number, an exception will be thrown.) pattern string: returns / sets the element's pattern attribute, containing a regular expression that the control's value is checked against.
...throws an invalid_state_err exception: if the method is not applicable to for the current type value, if the element has no step value, if the value cannot be converted to a number, if the resulting value is above the max or below the min.
...throws an invalid_state_err exception: if the method is not applicable to for the current type value., if the element has no step value, if the value cannot be converted to a number, if the resulting value is above the max or below the min.
IDBRequest - Web APIs
when the state is still pending, any attempt to access the result or error raises an invalidstateerror exception.
...if an error occurs while performing the operation, the exception is made available through the result property and an error event is fired (idbrequest.onerror).
... idbrequest.error read only returns a domexception in the event of an unsuccessful request, indicating what went wrong.
...if the the request failed and the result is not available, an invalidstateerror exception is thrown.
MediaRecorderErrorEvent.error - Web APIs
the read-only error property in the mediarecordererrorevent interface is a domexception object providing details about the exception that was thrown by a mediarecorder instance.
... syntax error = mediarecordererrorevent.error; value a domexception describing the error represented by the event.
... the error's name property's value may be any exception that makes sense during the handling of media recording, including these specifically identified by the specification.
... function recordstream(stream) { let recorder = null; let bufferlist = []; try { recorder = new mediarecorder(stream); } catch(err) { /* exception while trying to create the recorder; handle that */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; }; recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe def...
TextDecoder() - Web APIs
if the value for utflabel is unknown, or is one of the two values leading to a 'replacement' decoding algorithm ( "iso-2022-cn" or "iso-2022-cn-ext"), a domexception with the "typeerror" value is thrown.
...o-2022-kr" 'iso-2022-kr' "utf-16be" 'utf-16be' "utf-16", "utf-16le" 'utf-16le' "x-user-defined" 'x-user-defined' "iso-2022-cn", "iso-2022-cn-ext" 'replacement' optionsoptional is a textdecoderoptions dictionary with the property: fatal a boolean flag indicating if the textdecoder.decode() method must throw a domexception with the "encodingerror" value when an coding error is found.
... example var textdecoder1 = new textdecoder("iso-8859-2"); var textdecoder2 = new textdecoder(); var textdecoder3 = new textdecoder("csiso2022kr", {fatal: true}); // allows encodingerror exception to be thrown.
... var textdecoder4 = new textdecoder("iso-2022-cn"); // throw a typeerror exception.
Web APIs
WebAPI
clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfiguration domerror domexception domhighrestimestamp domimplementation domimplementationlist domlocator dommatrix dommatrixreadonly domobject domparser dompoint dompointinit dompointreadonly domquad domrect domrectreadonly domstring domstringlist domstringmap domtimestamp domtokenlist domuserdata datatransfer datatransferitem datatransferitemlist dedicatedworkerglobalscope delaynode deprecationreportbody deviceligh...
...xt_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic eckeygenparams eckeyimportparams ecdhkeyderiveparams ecdsaparams effecttiming element elementcssinlinestyle elementtraversal errorevent event eventlistener eventsource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest filesystem filesystemdirectoryentry filesystemdirectoryreader filesystementry filesystementrysync filesystemfileentry filesystemflags filesystemsync focusevent fontface fontfaceset fontfacesetloadevent formdata formdataentryvalue formdataevent fullscreenoptions g gainnode gamepad gamepadbutton gamepadevent gamepadhapticactu...
...nt htmltablecellelement htmltablecolelement htmltableelement htmltablerowelement htmltablesectionelement htmltemplateelement htmltextareaelement htmltimeelement htmltitleelement htmltrackelement htmlulistelement htmlunknownelement htmlvideoelement hashchangeevent headers history hkdfparams hmacimportparams hmackeygenparams i idbcursor idbcursorsync idbcursorwithvalue idbdatabase idbdatabaseexception idbdatabasesync idbenvironment idbenvironmentsync idbfactory idbfactorysync idbindex idbindexsync idbkeyrange idblocaleawarekeyrange idbmutablefile idbobjectstore idbobjectstoresync idbopendbrequest idbrequest idbtransaction idbtransactionsync idbversionchangeevent idbversionchangerequest iirfilternode idledeadline imagebitmap imagebitmaprenderingcontext imagecaptu...
...exarrayobject webkitcssmatrix websocket wheelevent window windowclient windoweventhandlers windoworworkerglobalscope worker workerglobalscope workerlocation workernavigator worklet writablestream writablestreamdefaultcontroller writablestreamdefaultwriter x xdomainrequest xmldocument xmlhttprequest xmlhttprequesteventtarget xmlhttprequestresponsetype xmlserializer xpathevaluator xpathexception xpathexpression xpathnsresolver xpathresult xrboundedreferencespace xrenvironmentblendmode xreye xrframe xrframerequestcallback xrhandedness xrinputsource xrinputsourcearray xrinputsourceevent xrinputsourceeventinit xrinputsourceschangeevent xrinputsourceschangeeventinit xrpermissiondescriptor xrpermissionstatus xrpose xrreferencespace xrreferencespaceevent xrreferencespaceeventinit xrreference...
HTTP Index - HTTP
WebHTTPIndex
with a few exceptions, policies mostly involve specifying server origins and script endpoints.
...when this policy is enabled, attempting to set document.domain will fail and cause a securityerror domexception to be be thrown.
...when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception.
...when this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a domexception.
Meta programming - JavaScript
the result of object.getownpropertydescriptor(target) can be applied to target using object.defineproperty and will not throw an exception.
... if a property has a corresponding target object property, then object.defineproperty(target, prop, descriptor) will not throw an exception.
... in strict mode, a false value returned from the defineproperty handler will throw a typeerror exception.
... in strict mode, a false return value from the set handler will throw a typeerror exception.
Optional chaining (?.) - JavaScript
using optional chaining with function calls causes the expression to automatically return undefined instead of throwing an exception if the method isn't found: let result = someinterface.custommethod?.(); note: if there is a property with such a name and which is not a function, using ?.
... will still raise a typeerror exception (someinterface.custommethod is not a function).
... note: if someinterface itself is null or undefined, a typeerror exception will still be raised (someinterface is null).
...do something with the data } catch (err) { onerror?.(err.message); // no exception if onerror is undefined } } optional chaining with expressions you can also use the optional chaining operator when accessing properties with an expression using the bracket notation of the property accessor: let nestedprop = obj?.['prop' + 'name']; optional chaining not valid on the left-hand side of an assignment let object = {}; object?.property = 1; // uncaught syntaxerror: invalid l...
passwords - Archive of obsolete content
the callback is passed an error containing a reason of a failure: this is an nsiexception object.
...the callback is passed an error argument: this is an nsiexception object.
...the callback is passed an error argument: this is an nsiexception object.
url - Archive of obsolete content
if source is not a valid uri, this constructor will throw an exception.
...if is not a valid uri, this constructor will throw an exception.
...an exception is raised if the url can't be converted; otherwise, the native file path is returned as a string.
event/core - Archive of obsolete content
all the exceptions that are thrown by listeners during the emit are caught and can be handled by listeners of 'error' event.
... thrown exceptions are passed as an argument to an 'error' event listener.
... if no 'error' listener is registered exception will be logged into an error console.
Index of archived content - Archive of obsolete content
vements in firefox 3 download manager preferences drag and drop drag and drop example drag and drop javascript wrapper drag and drop events editor embedding guide embedding faq embedding mozilla in a java application using javaxpcom error console exception logging in javascript existing content extension frequently asked questions external cvs snapshots in mozilla-central fast graphics performance with html firefox block and line layout cheat sheet content states and the style system disabling interruptible reflow document loadi...
... e4x tutorial accessing xml children descendants and filters introduction namespaces the global xml object iterator liveconnect liveconnect overview liveconnect reference jsexception jsobject msx emulator (jsmsx) old proxy api parallelarray properly using css and javascript in xhtml documents examples reference server-side javascript back to the server: server-...
... npn_invokedefault npn_memalloc npn_memflush npn_memfree npn_pluginthreadasynccall npn_posturl npn_posturlnotify npn_releaseobject npn_releasevariantvalue npn_reloadplugins npn_removeproperty npn_requestread npn_retainobject npn_setexception npn_setproperty npn_setvalue npn_setvalueforurl npn_status npn_utf8fromidentifier npn_useragent npn_version npn_write npobject npp nppvariable npp_destroy npp_destroystream npp_getvalue npp_handleevent npp_n...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
error: getldapattibutes failed: [exception...
... error: getldapattibutes failed: [exception...
...how as it been compiled?) about:buildconfig build platform target i686-pc-linux-gnu build tools compiler version compiler flags gcc gcc version 3.4.3 20050227 (red hat 3.4.3-22.fc3) -wall -w -wno-unused -wpointer-arith -wcast-align -wno-long-long -pedantic -pthread -pipe c++ gcc version 3.4.3 20050227 (red hat 3.4.3-22.fc3) -fno-rtti -fno-exceptions -wall -wconversion -wpointer-arith -wcast-align -woverloaded-virtual -wsynth -wno-ctor-dtor-privacy -wno-non-virtual-dtor -wno-long-long -pedantic -fshort-wchar -pthread -pipe -i/usr/x11r6/include configure arguments --disable-mailnews --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth --enable-crypto --disable-composer -...
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
ozilla.getinstance(); greversionrange[] range = new greversionrange[1]; range[0] = new greversionrange("1.8.0", true, "1.9", false); // work with trunk nightly version 1.9a1 ^^ try { file grepath = mozilla.getgrepathwithproperties(range, null); locationprovider locprovider = new locationprovider(grepath); mozilla.initembedding(grepath, grepath, locprovider); } catch (filenotfoundexception e) { // this exception is thrown if gregrepathwithproperties cannot find a gre } catch (xpcomexception e) { // this exception is thrown if initembedding failed } locationprovider is a class provided by the java application.
... if your code cannot find the gre and keeps throwing filenotfoundexceptions during the getgrepathwithproperties(...) call, check whether you already registered the gre on your system: gre registration the initembedding method kicks off the embedding process, allowing the java application to work with xpcom and mozilla.
... once the java application is done using mozilla, it needs to terminate the embedding process: try { mozilla.termembedding(); } catch (xpcomexception e) { // this exception is thrown if termembedding failed } working with xpcom objects now that mozilla is embedded, the java application can work with xpcom objects.
Metro browser chrome tests - Archive of obsolete content
exceptions in tests any exceptions thrown under test() will be caught and reported as a general failure.
... setup(), teardown(), and run() each have individual exception handlers to prevent one method from interfering with the execution of another.
... an exception in any of these methods will cause a test failure.
Using Breakpoints in Venkman - Archive of obsolete content
the pass exceptions to caller checkbox allows you to pass exceptions thrown by the breakpoint script directly to the caller.
... normally, if the breakpoint script generates an exception, venkman assumes you made a mistake and stops execution after displaying the exception.
... if you would like to see what your code does when exceptions are thrown at it, check "pass exceptions to caller", and thrown an exception from the breakpoint script.
Settings - Archive of obsolete content
pause on exceptions when this option is enabled, execution of the script will automatically pause whenever a javascript exception is thrown.
... ignore caught exceptions if this option is set (it is set by default) and "pause on exceptions" is set, then execution will pause on an exception only if that exception is not caught.
...you don't generally want to pause execution when an exception that is thrown is caught, since that generally indicates that your program is handling it properly.
Browser Detection and Cross Browser Support - Archive of obsolete content
since browsers such as netscape navigator 4 and internet explorer 4 do not support some of the most recent additions to the javascript (ecmascript) standard, it is often necessary to limit the use of advanced javascript features such as exception processing.
...catch exception processing.
... try { // code to implement fancy menu } catch (errors) { // handle exceptions } </script> <noscript> <!-- if javascript is not enabled, then the browser will display the contents of the noscript tag which in this case is a simple menu implemented as an unordered list.
Implementation Status - Archive of obsolete content
3.2.4 node-set binding attributes supported 3.2.5 model item property attributes partial in some cases a loop error can occur on valid bindings 302168; 3.3.1 model supported 3.3.2 instance partial instance element with two child element does not trigger exception 337302; 3.3.3 submission partial no support for @indent and complex schema validation 278761; 278762; 3.3.4 bind partial using the index() function in binds does not work.
...-range supported 4.4.17 xforms-out-of-range supported 4.4.18 xforms-scroll-first xforms-scroll-last supported 4.4.19 xforms-submit-done supported 4.5 error indications partial we don't support the xforms-version-exception event, yet 4.5.1 xforms-binding-exception supported 4.5.2 xforms-compute-exception supported 4.5.3 xforms-link-error partial not yet generated by load.
... 333782; 4.5.4 xforms-link-exception supported 4.5.5 xforms-output-exception unsupported 4.5.6 xforms-submit-error supported 4.5.7 xforms-version-exception unsupported 4.6 event sequencing supported 4.6.1 for input, secret, textarea, range, or upload controls supported 4.6.2 for output controls supported 4.6.3 for select or select1 controls partial 4.6.4 for trigger controls supported 4.6...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
136 exception beginner, codingscripting, glossary an exception is a condition that interrupts normal code execution.
... in javascript syntax errors are a very common source of exceptions.
... 444 syntax error codingscripting, glossary, javascript an exception caused by the incorrect use of a pre-defined syntax.
Componentizing our React app - Learn web development
your <ul> should read like this: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > <todo /> <todo /> <todo /> </ul> when you look back at your browser, you'll notice something unfortunate: your list now repeats the first task three times!
...let's start by turning our tasks array into something simple: the name of each task: const tasklist = props.tasks.map(task => task.name); let’s try replacing all the children of the <ul> with tasklist: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > {tasklist} </ul> this gets us some of the way towards showing all the components again, but we’ve got more work to do: the browser currently renders each task's name as unstructured text.
...filterbutton from "./components/filterbutton"; import todo from "./components/todo"; function app(props) { const tasklist = props.tasks.map(task => ( <todo id={task.id} name={task.name} completed={task.completed} key={task.id} /> ) ); return ( <div classname="todoapp stack-large"> <form /> <div classname="filters btn-group stack-exception"> <filterbutton /> <filterbutton /> <filterbutton /> </div> <h2 id="list-heading">3 tasks remaining</h2> <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > {tasklist} </ul> </div> ); } export default app; with this in place, we’re almost ready to tackle s...
What to do and what not to do in Bugzilla
the exceptions are bugs in other software which we have to work around and bugs that involve certain core gecko modules.
... bugs covered by this exception should not be invalidated by anyone other than the module owner or module peer; for bugs involving modules like layout or content, attach a test case to the bug and then cc one of the owners or peers.
...the exceptions to this rule are platform-specific or compiler-specific bugs.
Examples
this state will propagate to newpomise, and components.utils.reporterror will report all the details of the exception to the console.
...ypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefinedpromise() { return 'i didnt do a promise.resolve so this will not understand that mypromise is a promise'; } // creates this error: /* exception: mypromise.then is not a function @scratchpad/5:8:1 wca_evalwithdebugger@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:1069:7 wca_onevaluatejs@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:734:9 dsc_onpacket@resource://gre/modules/commonjs/toolkit/loader.js -> reso...
... settimeout(function () { deferred.resolve('rawr my success value'); }, atimeout); } catch (ex) { // generally, functions returning promises propagate exceptions through // the returned promise, though they may also choose to fail early.
Promise.jsm
this may be any value, including undefined, though it is generally an error object, like in exception handling.
...for example, unhandled exceptions in the callbacks cause the new promise to be rejected, even if the original promise is fulfilled.
...although the reason can be undefined, it is generally an error object, like in exception handling.
NSS API Guidelines
there can be legitimate exceptions to this 'make everything opaque' rule.
...exceptions to this include objects which are created on the fly, or as global objects.
... the exception to this global effects rule may be functions which set global state for an application at initialization time.
Scripting Java
java exceptions exceptions thrown by java methods can be caught by javascript code using try...catch statement.
... rhino wraps java exceptions into error objects with the following properties: javaexception: the original exception thrown by the java method rhinoexception: the exception wrapped by the rhino runtime the instanceof operator can be used to query the type of an exception: try { java.lang.class.forname("nonexistingclass"); } catch (e) { if (e.javaexception instanceof java.lang.classnotfoundexception) { print("class not found"); } } rhino also supports an extension to the try...catch statement that allows to define conditional catching of exceptions: function classforname(name) { try { return java.lang.class.forname(name); } catch (e if e.javaexception instanceof java.lang.classnotfoundexception) { print("class " + name + " not found"); } catch...
... (e if e.javaexception instanceof java.lang.nullpointerexception) { print("class name is null"); } } classforname("nonexistingclass"); classforname(null); ...
JSNative
js_reporterror or js_reportoutofmemory) or raise an exception (using js_setpendingexception), and the callback must return false.
... (returning false without reporting an error or raising an exception terminates the script with an uncatchable error.
... see also mxr id search for jsnative js::callargs js_reporterror js_reportoutofmemory js_setpendingexception ...
JS_ReportError
this function can also raise a javascript exception which a currently executing script can catch.
...if the caller is in a jsapi callback, js_reporterror also creates a new javascript error object and sets it to be the pending exception on cx.
... the callback must then return js_false to cause the exception to be propagated to the calling script.
JS_ReportErrorNumber
description these functions create a jserrorreport, populate it with an error message obtained from the given jserrorcallback, and either report it to the current error reporter callback or create an error object and set it as the pending exception.
...the source code seems to say we ignore the .exntype, actually, but surely i'm just missing something.) otherwise, if any javascript code is running in cx (for example, if the caller is a jsnative that was called from a script), then an error object is created and becomes the pending exception.
... the error reporter is not called yet, because the script still has an opportunity to catch and handle the exception.
JS_ValueToString
if at any point an error or exception occurs, or conversion succeeds, the rest of the steps are skipped.
...on error or exception, it returns null.
... this happens, for example, if v is an object and v.tostring() throws an exception.
Secure Development Guidelines
ed write to un-initialized file descriptor checking return values check all return values—no matter how unlikely the api failure for example: close() can fail and leak file descriptor setuid() can fail and privileges don’t get dropped snprintf() can fail and result in return value -1 tmp = realloc(tmp, size) — realloc could fail and leak tmp writing secure code: exception handling double freeing pointers double frees can occur in exception handling they free data in try block and then free it again in the catch block this is a common issue double freeing pointers char *ptr1 = null, *ptr2 = null; try { ptr1 = new char[1024]; do_something(); delete ptr1; do_something_else(); ptr2 = new char[-1] // oom } catch (...) { delete p...
...tr1; delete ptr2; } new will throw an exception — ptr1 is already freed in the try block then freed again in the catch block freeing un-initialized data free data in the catch block assumption is that it’s initialized in the try block if the try block throws before the variable is initialized, the catch block will operate on un-intialized data freeing un-initialized data example: int main(){ char *ptr; try { ptr = new char[-1]; // oom } catch(...) { delete ptr; } } freeing un-initialized data: prevention be careful when freeing data in catch blocks make sure the try block can’t throw before data is initialized initialize variables when they’re declared; for example, set pointers to null memory leaks usually occur when ...
...code that might throw an exception ...
Using the Places annotation service
however, it is more efficient to just try to do the operation and catch the exception; the extra check requires an additional database lookup (which has higher overhead).
... but then again you won't know if the exception meant that the annotation did not exist or something else is broken.
... the getter functions return only the value of the annotation (with the exception of the c++ getpageannotationbinary and getitemannotationbinary methods which return the mimetype as well).
Setting up the Gecko SDK
assuming you are using the example location for your project, these paths are the following: c:\gecko-sdk\embedstring\include c:\gecko-sdk\xpcom\include c:\gecko-sdk\nspr\include c:\gecko-sdk\string\include under the c++ language category, disable exception handling.
... as described in the section exceptions in xpcom, exception handling isn't supported across interface boundaries, so setting this option may catch problems during development.
...gecko_sdk_path ?= $(home)/tmp/xr xpidl ?= $(gecko_sdk_path)/bin/xpidl cxx ?= c++ xpidlsrcs = \ interfacea.idl \ interfaceb.idl \ $(null) cppsrcs = \ sourcea.cpp \ sourceb.cpp \ $(null) cppflags += -fno-rtti \ -fno-exceptions \ -fshort-wchar \ -fpic \ $(null) # gcc only define which allows us to not have to #include mozilla-config # in every .cpp file.
Components.lastResult
this is because failure result codes get converted by xpconnect into exceptions that are thrown into the calling javascript method.
...} catch (e) { // the call threw an exception or a native component returned // a failure code!
... if (e instanceof components.interfaces.nsixpcexception) { // we might do something interesting here with the exception object var rv = e.result; } else { // if we don't know how to handle it then rethrow throw e; } } ...
Components.utils.reportError
it is meant for use by extension developers who have exception handler blocks which want to "eat" an exception, but still want to report it to the console.
... it must be called with one parameter, usually an object which was caught by an exception handler.
... examples usage in an exception handler: try { this.could.raise.an.exception; } catch(e) { components.utils.reporterror(e); // report the error and continue execution } sending debugging messages to the error console: components.utils.reporterror("init() called"); ...
Language bindings
pt as a top level object using xpconnect.components.classescomponents.classes is a read-only object whose properties are classes indexed by contractid.components.classesbyidcomponents.classesbyid is a read-only object whose properties are classes indexed by cid.components.constructorcreates a javascript function which can be used to create or construct new instances of xpcom components.components.exceptioncomponents.exception is a javascript constructor to create nsixpcexception objects.
... these exception objects may be thrown when implementing xpcom interfaces in javascript, and they can provide better diagnostics in the error console if not caught than simply throwing an nsresult's value will.components.idcomponents.id is a constructor that creates native objects that conform to the nsijsid interface.components.interfacescomponents.interfaces is a read-only object whose properties are interfaces indexed by their names.components.interfacesbyidcomponents.interfacesbyid is a read-only array of classes indexed by iid.components.issuccesscodedetermines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.components.lastresultcomponents.managercomponents.manager is a convenience reflection ...
...it is meant for use by extension developers who have exception handler blocks which want to "eat" an exception, but still want to report it to the console.components.utils.sandboxcomponents.utils.sandbox is used to create a sandbox object for use with evalinsandbox().components.utils.scheduleprecisegcthis method lets scripts schedule a garbage collection cycle.
mozIStorageService
exceptions thrown ns_error_failure an error occurred attempting to open the database.
...exceptions thrown ns_error_invalid_arg if astoragekey is invalid.
...exceptions thrown ns_error_failure an error occurred attempting to open the database.
nsIAccessibleHyperText
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... return value missing description exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
nsIBrowserSearchService
it will not be called if addengine throws an exception.
... exceptions thrown ns_error_failure if the type is invalid, or if the description file cannot be successfully loaded.
... exceptions thrown ns_error_failure if newindex is out of bounds, or if engine is hidden.
nsIChannelEventSink
this method notifies the sink that a redirect is about to happen, but also to gives the sink the right to veto the redirect by throwing an exception or passing a failure code in the callback.
...if the return value indicates that an error occurred, in which case an exception is thrown, the redirect is vetoed and no callback must be done.
... exceptions thrown this method can throw any exception; if an exception occurs, the load will be canceled, and no network requests will occur for the new channel.
nsIFocusManager
setting this to null or to a non-top-level window throws an ns_error_invalid_arg exception.
...void clearfocus( in nsidomwindow awindow ); parameters awindow exceptions thrown ns_error_invalid_arg if awindow is null.
...exceptions thrown ns_error_invalid_arg if awindow is null.
nsIJumpListBuilder
exceptions thrown ns_error_not_available on all calls if taskbar functionality is not supported by the operating system.
...exceptions thrown ns_error_unexpected on internal errors.
...exceptions thrown ns_error_unexpected on internal errors.
nsIMsgFilter
throws an exception if the action is not priority attribute nsmsgpriorityvalue priority; targetfolderuri // target folder..
... throws an exception if the action is not move to folder attribute acstring targetfolderuri; label // target label.
... throws an exception if the action is not label attribute nsmsglabelvalue label; junkscore attribute long junkscore; strvalue attribute autf8string strvalue; customid // action id if type is custom attribute acstring customid; customaction // custom action associated with customid // (which must be set prior to reading this attribute) readonly attribute nsimsgfiltercustomaction customaction; methods addterm() void nsimsgfilter::addterm ( in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in acstring arbitraryheader ) getterm() void nsimsgfilter::getterm ( in long termindex, in nsmsgsearchattribvalue attrib, in nsmsg...
nsIMsgRuleAction
throws an exception if the action is not priority attribute nsmsgpriorityvalue priority; // target folder..
... throws an exception if the action is not move to folder attribute acstring targetfolderuri; // target label.
... throws an exception if the action is not label attribute nsmsglabelvalue label; // junkscore throws an exception if the action type is not junkscore attribute long junkscore; attribute autf8string strvalue; // action id if type is custom attribute acstring customid; // custom action associated with customid // (which must be set prior to reading this attribute) readonly attribute nsimsgfiltercustomaction customaction; }; ...
nsIMutableArray
exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
... exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
... exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
nsISeekableStream
exceptions thrown ns_base_stream_closed if called on a closed stream.
...exceptions thrown ns_base_stream_closed if called on a closed stream.
...exceptions thrown ns_base_stream_closed if called on a closed stream.
nsISessionStore
exceptions thrown this method throws a ns_error_illegal_value exception if the key doesn't exist.
... return value exceptions thrown ns_error_invalid_arg when aindex does not map to a closed window.
... if the preference browser.sessionstate.enabled is false when this method is called, then you will get an exception about "awindows[i] has no properties".
nsIThread
exceptions thrown ns_error_unexpected shutdown() was erroneously called from within the thread itself, the thread was not created with the thread manager's nsithreadmanager.newthread() method, or the thread is already in the process of being shut down.
... exceptions thrown ns_error_unexpected the method was called when this thread wasn't the current thread.
... exceptions thrown ns_error_unexpected this method was called when this thread wasn't the current thread.
nsIToolkitProfileService
exceptions thrown ns_error_unexpected an unexpected error condition occurred.
...exceptions thrown ns_error_out_of_memory an error occurred trying to allocate the memory buffer used to construct the profile list.
...exceptions thrown ns_error_failure no matching profile was found.
nsIWebBrowserPersist
exceptions thrown ns_error_invalid_arg one or more arguments was invalid.
... exceptions thrown ns_error_invalid_arg one or more arguments was invalid.
...all arguments and exceptions are identical to saveuri, with the exception of aisprivate which is used to indicate the private nature of the operation.
nsIWebProgress
exceptions thrown ns_error_failure indicates that there is no associated dom window.
... exceptions thrown ns_error_invalid_arg indicates that alistener was either null or that it does not support weak references.
... exceptions thrown ns_error_failure indicates that alistener was not registered.
nsIXULTemplateQueryProcessor
exceptions thrown ns_error_unexpected if generateresults() has already been called.
...exceptions thrown ns_error_invalid_arg if aquery is invalid.
... exceptions thrown ns_error_invalid_arg if the datasource is not supported.
nsIAbCard/Thunderbird3
exceptions thrown ns_error_not_available<tt> if the named property does not exist.
... exceptions thrown ns_error_not_available<tt> if the named property does not exist.
... exceptions thrown ns_error_illegal_value type not recognized.
XPIDL
attributes support all of the properties of methods with the exception of optional_argc, as this does not make sense for attributes.
...an exception to the above rule is if the parameter has the iid_is property (a special case for some queryinterface-like operations).
...finally, as an exception to everything already mentioned, for attribute getters and setters the jscontext *cx comes before any other arguments.
CData
this will throw a typeerror exception if the value can't be converted.
... if the 8-bit string contains invalid encoded character, a typeerror exception is thrown.
... if the 8-bit string contains invalid encoded character, no exception is thrown.
PointerType
exceptions thrown typeerror thrown if the parameter isn't a ctype.
...if converting the data fails, a typeerror exception is thrown.
...this will throw a typeerror exception if the value can't be converted.
Debugger.Environment - Firefox Developer Tools
spidermonkey creates debugger.environment instances as needed as the debugger inspects stack frames and function objects; calling debugger.environment as a function or constructor raises a typeerror exception.
... this is not an invocation function; if this call would cause debuggee code to run (say, because the environment is a "with" environment, andname refers to an accessor property of the with statement’s operand), this call throws a debugger.debuggeewouldrun exception.
... this is not an invocation function; if this call would cause debuggee code to run, this call throws a debugger.debuggeewouldrun exception.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
exceptions while this method doesn't throw exceptions, it may reject the promise.
... this can happen, for example, if the reader used to fetch the blob's data throws an exception.
... any exceptions thrown while getting the data will be converted into rejections.
DOMMatrixReadOnly - Web APIs
throws an invalidstateerror exception if any of the elements in the matrix are non-finite (even if, in the case of a 2d matrix, the non-finite values are in elements not used by the 2d matrix representation).
...otherwise, a typeerror exception is thrown.
...otherwise, a typeerror exception is thrown.
FileSystemDirectoryEntry - Web APIs
support yesgetdirectory experimentalchrome full support 8edge full support 79firefox full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android ...
... full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.opera android no support nosafari ios full support 11.3samsung internet android full support yesgetfile experimentalchrome full support 8edge full support 79firefox full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter ...
...is a domexception rather than a fileerror object.ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.opera android no support nosafari ios full support 11.3samsung interne...
HTMLTableRowElement - Web APIs
if the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than 0, it raises a domexception with the indexsizeerror value.
...if the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than -1, it raises a domexception with the indexsizeerror value.
... the methods insertcell and deletecell can raise exceptions.
HTMLTableSectionElement - Web APIs
if the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than 0, it raises a domexception with the indexsizeerror value.
...if the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than -1, it raises a domexception with the indexsizeerror value.
... obsolete the methods insertrow and deleterow can raise exceptions.
Working with the History API - Web APIs
but there is one important exception: after using history.pushstate(), calling history.back() does not raise a popstate event.
...if you pass a state object whose serialized representation is larger than this to pushstate(), the method will throw an exception.
...the new url must be of the same origin as the current url; otherwise, pushstate() will throw an exception.
IDBCursorSync - Web APIs
method overview bool continue (in optional any key); void remove () raises (idbdatabaseexception); attributes attribute type description count readonly unsigned long long the total number of objects that share the current key.
...setting this attribute can raise an idbdatabaseexception with the following codes: data_err if the underlying object store uses in-line keys and the property at the key path does not match the key in this cursor's position.
... remove() deletes the record at the cursor's position, without changing the cursor's position void delete ( ) raises (databaseexception); exceptions this method can raise an idbdatabaseexception with the following code: not_allowed_err if the underlying index or object store does not support updating the record because it is open in the read_only or snapshot_read mode.
IDBFactorySync - Web APIs
method overview idbdatabasesync open (in domstring name, in domstring description, in optional boolean modifydatabase) raises (idbdatabaseexception); methods open() opens and returns a connection to a database.
... idbdatabasesync open ( in domstring name, in domstring description ) raises (idbdatabaseexception); parameters name the name for the database.
... exceptions this method can raise an idbdatabaseexception with the following codes: non_transient_err if the name parameter is not valid.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
if it is lower than 0 or greater than 232-1 a typeerror exception will be thrown.
... exceptions this method may raise a domexception of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
... a typeerror exception is thrown if the count parameter is not between 0 and 232-1 included.
IDBIndex.getAllKeys() - Web APIs
if it is lower than 0 or greater than 232-1 a typeerror exception will be thrown.
... exceptions this method may raise a domexception of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
... a typeerror exception is thrown if the count parameter is not between 0 and 232-1 included.
IDBObjectStore.getAll() - Web APIs
if it is lower than 0 or greater than 232-1 a typeerror exception will be thrown.
... exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbobjectstore's transaction is inactive.
... a typeerror exception is thrown if the count parameter is not between 0 and 232-1 included.
LocalFileSystemSync - Web APIs
method overview filesystemsync requestfilesystemsync (in unsigned short type, in long long size) raises fileexception; entrysync resolvelocalfilesystemsyncurl (in domstring url) raises fileexception; constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion.
... exceptions this method can raise an fileexception with the following code: exception description security_error the application does not have permission to access the file system interface.
... exceptions this method can raise a fileexception with the following codes: exception description encoding_err the syntax of the url was invalid.
MediaRecorder.onerror - Web APIs
the error object is of type mediarecordererrorevent, and its error property contains a domexception object that describes the error that occurred.
...this exception can also occur when a request is made on a source that has been deleted or removed.
...it returns either the mediarecorder or the name of the error that occurred if any exceptions are thrown during the setup process.
Node.removeChild() - Web APIs
WebAPINoderemoveChild
if child is actually not a child of the element node, the method throws an exception.
... this will also happen if child was in fact a child of element at the time of the call, but was removed by an event handler invoked in the course of trying to remove the element (e.g., blur.) errors thrown the method throws an exception in 2 different ways: if the child was in fact a child of element and so existing on the dom, but was removed the method throws the following exception: uncaught notfounderror: failed to execute 'removechild' on 'node': the node to be removed is not a child of this node.
... if the child doesn't exist on the dom of the page, the method throws the following exception: uncaught typeerror: failed to execute 'removechild' on 'node': parameter 1 is not of type 'node'.
PaymentResponse.retry() - Web APIs
the promise is rejected with an appropriate exception value if the payment fails again.
...see the list of exceptions for show() for further details.
... async function handlepayment() { const payrequest = new paymentrequest(methoddata, details, options); try { let payresponse = await payrequest.show(); while (payresponse has errors) { /* let the user edit the payment information, wait until they submit */ await response.retry(); } await payresponse.complete("success"); } catch(err) { /* handle the exception */ } } examples try { await paymentrequest.retry(errorfields); } catch (domexception err) { ...
RTCPeerConnection.createAnswer() - Web APIs
failurecallback an rtcpeerconnectionerrorcallback which will be passed a single domexception object explaining why the request to create an answer failed.
... exceptions notreadableerror the identity provider wasn't able to provide an identity assertion.
... operationerror generation of the sdp failed for some reason; this is a general failure catch-all exception.
RTCPeerConnection.createOffer() - Web APIs
errorcallback an rtcpeerconnectionerrorcallback which will be passed a single domexception object explaining why the request to create an offer failed.
... exceptions these exceptions are returned by rejecting the returned promise.
... your rejection handler should examine the received exception to determine which occurred.
SVGStyleElement - Web APIs
svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
if you try to set the mode property value to segments when the initial value is sequence, an exception will be thrown.
... exceptions the following exceptions may be thrown when setting a new value for this property.
... exception explanation invalidaccesserror an attempt was made to set the value to segments when the initial value is sequence.
URL() - Web APIs
WebAPIURLURL
if the given base url or the resulting url are not valid urls, the javascript typeerror exception is thrown.
... exceptions exception explanation typeerror url (in the case of absolute urls) or base + url (in the case of relative urls) is not a valid url.
...cs' new url('/docs', a); // => 'https://developer.mozilla.org/docs' new url('/docs', "https://developer.mozilla.org/fr-fr/toto"); // => 'https://developer.mozilla.org/docs' new url('/docs', ''); // raises a typeerror exception as '' is not a valid url new url('/docs'); // raises a typeerror exception as '/docs' is not a valid url new url('http://www.example.com', ); // => 'http://www.example.com/' new url('http://www.example.com', b); // => 'http://www.example.com/' new url("//foo.com", "https://example.com") // => 'https://foo.com' (see rela...
Using Web Workers - Web APIs
you can run whatever code you like inside the worker thread, with some exceptions.
...in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel attributes on xmlhttprequest always return null.
... the exception to this is if the worker script's origin is a globally unique identifier (for example, if its url has a scheme of data or blob).
Specificity - CSS: Cascading Style Sheets
the !important exception when an important rule is used on a style declaration, this declaration overrides any other declarations.
...-implications-of-using-important-in-css https://stackoverflow.com/questions/9245353/what-does-important-in-css-mean https://stackoverflow.com/questions/5701149/when-to-use-important-property-in-css https://stackoverflow.com/questions/11178673/how-to-override-important https://stackoverflow.com/questions/2042497/when-to-use-important-to-save-the-day-when-working-with-css the :is() and :not() exceptions the matches-any pseudo-class :is() and the negation pseudo-class :not() are not considered a pseudo-class in the specificity calculation.
...appears on the screen like this: the :where() exception the specificity-adjustment pseudo-class :where() always has its specificity replaced with zero.
Browser detection using the user agent - HTTP
however, internet explorer was such a special little wasp exception prior to version 9 that it was very easy to detect the browser based upon the browser-specific features available.
... most browsers set the name and version in the format browsername/versionnumber, with the notable exception of internet explorer.
... blink chrome/xyz rendering engine version most rendering engines put the version number in the renderingengine/versionnumber token, with the notable exception of gecko.
Proxy Auto-Configuration (PAC) file - HTTP
example 2 as above, but use proxy for local servers which are outside the firewall if there are hosts (such as the main web server) that belong to the local domain but are outside the firewall and are only reachable through the proxy server, those exceptions can be handled using the localhostordomainis() function: function findproxyforurl(url, host) { if ( (isplainhostname(host) || dnsdomainis(host, ".mozilla.org")) && !localhostordomainis(host, "www.mozilla.org") && !localhostordoaminis(host, "merchant.mozilla.org") ) { return "direct"; } else { return "proxy w3proxy.mozilla.org:8080; direct"; } } the above example wil...
...l use the proxy for everything except local hosts in the mozilla.org domain, with the further exception that hosts www.mozilla.org and merchant.mozilla.org will go through the proxy.
... note the order of the above exceptions for efficiency: localhostordomainis() functions only get executed for urls that are in local domain, not for every url.
Iterators and generators - JavaScript
console.log(sequence.next().value); // 2 console.log(sequence.next().value); // 3 console.log(sequence.next().value); // 5 console.log(sequence.next().value); // 8 console.log(sequence.next(true).value); // 0 console.log(sequence.next().value); // 1 console.log(sequence.next().value); // 1 console.log(sequence.next().value); // 2 you can force a generator to throw an exception by calling its throw() method and passing the exception value it should throw.
... this exception will be thrown from the current suspended context of the generator, as if the yield that is currently suspended were instead a throw value statement.
... if the exception is not caught from within the generator, it will propagate up through the call to throw(), and subsequent calls to next() will result in the done property being true.
Inheritance and the prototype chain - JavaScript
the only exception to the getting and setting behavior rules is when there is an inherited property with a getter or a setter.
...// (ps: there is one exception that arrow function doesn't have a default prototype property) var dosomething = function(){}; console.log( dosomething.prototype ); as seen above, dosomething() has a default prototype property, as demonstrated by the console.
...it does not throw an exception.
Error - JavaScript
the error object can also be used as a base object for user-defined exceptions.
...for client-side exceptions, see exception handling statements.
...etc } custom error types you might want to define your own error types deriving from error to be able to throw new myerror() and use instanceof myerror to check the kind of error in the exception handler.
EvalError() constructor - JavaScript
this exception is not thrown by javascript anymore, however the evalerror object remains for compatibility.
...the name of the file containing the code that caused the exception linenumber optional.
... the line number of the code that caused the exception examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the runtime.
Web audio codec guide - Web media technologies
possible exceptions include looped music, where you need music to be able to play back uninterrupted over and over, or when you need to be able to play songs back to back with no gap between them.
... note: compatibility information described here is generally correct as of the time this article was written; however, there may be caveats and exceptions.
...of course, if you can provide multiple formats (for example, by using the <source> element within your <audio> and <video> elements), you can avoid many or all of those exceptions.
Introduction to using XPath in JavaScript - XPath
note that, if the xpathexpression contains a namespace prefix, this will result in a domexception being thrown with the code namespace_err.
...mber to a string for display, the xpath interface will not automatically convert the numerical result if the stringvalue property is requested, so the following code will not work: var paragraphcount = document.evaluate('count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.stringvalue + ' paragraph elements' ); instead, it will return an exception with the code ns_dom_type_error.
... note however, that if the document is mutated (the document tree is modified) between iterations that will invalidate the iteration and the invaliditeratorstate property of xpathresult is set to true, and a ns_error_dom_invalid_state_err exception is thrown.
indexed-db - Archive of obsolete content
domexception provides more detailed information about an exception.
... see the domexception documentation.
selection - Archive of obsolete content
setting the selection when there is no current selection throws an exception.
...setting the selection when there is no current selection throws an exception.
event/target - Archive of obsolete content
: let { emit } = require('sdk/event/core'); target.on('message', function onmessage(message) { console.log('listener triggered'); target.on('message', function() { console.log('nested listener triggered'); }); }); emit(target, 'message'); // info: 'listener triggered' emit(target, 'message'); // info: 'listener triggered' // info: 'nested listener triggered' exceptions in the listeners can be handled via 'error' event listeners: target.on('boom', function() { throw error('boom!'); }); target.once('error', function(error) { console.log('caught an error: ' + error.message); }); emit(target, 'boom'); // info: caught an error: boom!
... if there is no listener registered for error event or if it also throws exception then such exceptions are logged into a console.
util/deprecate - Archive of obsolete content
it does not raise an exception, but just displays the error message and continues to execute the function.
... it does not raise an exception, but just displays the error message and returns.
Chrome Authority - Archive of obsolete content
if the scanner fails to see a require entry, the manifest will not include that entry, and (once the implementation is complete) the runtime code will get an exception.
... for example, none of the following code will be matched by the manifest scanner, leading to exceptions at runtime, when the require() call is prohibited from importing the named modules: // all of these will fail!
File I/O - Archive of obsolete content
note: you can still get a file object even if the specified file does not exist, and no exception will be thrown.
... an exception is thrown only when methods that require the file to exist are called, e.g., isdirectory(), moveto(), and so on.
JavaScript Debugger Service - Archive of obsolete content
note that onerror is called for every exception.
..., colno, flags, errnum, exc) { dump(message + "@" + filename + "@" + lineno + "@" + colno + "@" + errnum + "\n"); // check message type var jsdierrorhook = components.interfaces.jsdierrorhook; var messagetype; if (flags & jsdierrorhook.report_error) messagetype = "error"; if (flags & jsdierrorhook.report_warning) messagetype = "warning"; if (flags & jsdierrorhook.report_exception) messagetype = "uncaught-exception"; if (flags & jsdierrorhook.report_strict) messagetype += "-strict"; dump(messagetype + "\n"); return false; // trigger debughook // return true; if you do not wish to trigger debughook } }; // note that debughook does not _always_ trigger when jsd.errorhook[onerror] returns false // it is not well-known why debughook sometimes fails to trigg...
The Essentials of an Extension - Archive of obsolete content
most of these files are opened as text files, with the exception of xul files, which are executed and displayed like you would normally see them on a window.
...we never use actual tab characters, with the exception of makefiles, which will be covered later on.
Setting up an extension development environment - Archive of obsolete content
you might also want to set dom.report_all_js_exceptions = true.
... see exception logging in javascript for details.
cert_override.txt - Archive of obsolete content
cert_override.txt is a text file generated in the user profile to store certificate exceptions specified by the user.
...since there is no way to add easily an exception in a xulrunner 1.9 project, you can open the page in firefox, accept the certificate, then copy the cert_override.txt to the xulrunner application profile.
XML in Mozilla - Archive of obsolete content
another exception is an entity whose system identifier is a relative path, and the xml declaration states that the document is not standalone (default), in which case mozilla will try to look for the entity under <bin>/res/dtd directory.
... mozilla may also make an exception with xhtml documents, see below.
Getting File Information - Archive of obsolete content
if the file does not exist, a 'file not found' exception will occur.
... you can catch this exception with a try-catch block, but it is better to use nsifile.exists() to check first.
Introduction to XUL - Archive of obsolete content
the task of writing a xul window description is basically the same as the task of writing an html content description, with these exceptions: the syntax is xml (not that different from html 4), and there are some elements unique to xul.
...rare exceptions to this rule are bugs.
Writing Skinnable XUL and CSS - Archive of obsolete content
there is one notable exception to this rule.
...exceptions to this rule must be approved in order to be allowed into the product.
LiveConnect - Archive of obsolete content
the reimplementation also restores the ability to use try-catch exceptions within javascript, and is free of the increasing number of other bugs introduced by the decline of the original liveconnect (e.g., java.lang.string and arrays not working properly).
... liveconnect exceptions how do java and javascript catch exceptions generated by the other party?
Troubleshooting XForms Forms - Archive of obsolete content
the xss sub-tab has the following options: turn cross-site post requests into data-less get requests anti-xss protection exceptions you can temporarily fix the problem by unchecking the turn cross-site post requests into data-less get requests check box.
... alternatively, for a long term fix you can enter an exception pattern in the anti-xss protection exceptions text area.
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
no hoisting happens so trying to read the variable results in referenceerror exception.
... console.log(num); // throws referenceerror exception num = 6; // initialization below are more examples demonstrating hoisting.
WAI-ARIA basics - Learn web development
we will clearly mention any exceptions to this.
... note: most browsers will throw a security exception if you try to do an xmlhttprequest call from a file:// url, e.g.
Web fonts - Learn web development
most of these services are subscription-based, with the notable exception of google fonts, a useful free service, especially for rapid testing work and writing demos.
...the one exception to this is the eot fonts — they are placed first to fix a couple of bugs in older versions of ie whereby it will try to use the first thing it finds, even if it can't actually use the font.
What is a URL? - Learn web development
in practice, there are some exceptions, the most common being a url pointing to a resource that no longer exists or that has moved.
... note: when specifying urls to load resources as part of a page (such as when using the <script>, <audio>, <img>, <video>, and the like), you should generally only use http and https urls, with few exceptions (one notable one being data:; see data urls).
Drawing graphics - Learn web development
note: basic canvas functionality is supported well across browsers, with the exception of ie 8 and below for 2d canvas, and ie 11 and below for webgl.
... function draw() { if(pressed) { ctx.fillstyle = colorpicker.value; ctx.beginpath(); ctx.arc(curx, cury-85, sizepicker.value, degtorad(0), degtorad(360), false); ctx.fill(); } requestanimationframe(draw); } draw(); note: the <input> range and color types are supported fairly well across browsers, with the exception of internet explorer versions less than 10; also safari doesn't yet support color.
Starting our Svelte Todo list app - Learn web development
</label> </h2> <input type="text" id="todo-0" autocomplete="off" class="input input__lg" /> <button type="submit" disabled="" class="btn btn__primary btn__lg"> add </button> </form> <!-- filter --> <div class="filters btn-group stack-exception"> <button class="btn toggle-btn" aria-pressed="true"> <span class="visually-hidden">show</span> <span>all</span> <span class="visually-hidden">tasks</span> </button> <button class="btn toggle-btn" aria-pressed="false"> <span class="visually-hidden">show</span> <span>active</span> <span class="visually-hidden">tasks</span> </button> <button c...
... clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack-large > * + * { margin-top: 2.5rem; } @media screen and (min-width: 550px) { .stack-small > * + * { margin-top: 1.4rem; } .stack-large > * + * { margin-top: 2.8rem; } } .stack-exception { margin-top: 1.2rem; } /* end global styles */ .todoapp { background: #fff; margin: 2rem 0 4rem 0; padding: 1rem; position: relative; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 2.5rem 5rem 0 rgba(0, 0, 0, 0.1); } @media screen and (min-width: 550px) { .todoapp { padding: 4rem; } } .todoapp > * { max-width: 50rem; margin-left: auto; margin-right: auto; } .todoapp > f...
Gecko info for Windows accessibility vendors
going forward, this may be the only way to efficiently find the content area, as mozilla will begin to become a windowless application, with an exception for plugins which create their own window.
...the exception is progress meters, which are guaranteed to fire event_show and event_hide events when they are displayed or hidden.
Browser chrome tests
requestlongertimeout(2); waitforexplicitfinish(); settimeout(completetest, 40000); } function completetest() { ok(true, "timeout did not run"); finish(); } exceptions in tests any exceptions thrown under test() will be caught and reported in the test output as a failure.
... exceptions thrown outside of test() (e.g.
Cross Process Object Wrappers
if browser code tries an unsafe cpow operation, the browser will throw an exception and you'll see an "unsafe cpow usage forbidden” error in the browser console.
...however, if an add-on passes a cpow into a platform api, and that platform api then attempts an unsafe operation on it, this will throw an exception.
Limitations of chrome scripts
if browser code tries an unsafe cpow operation, the browser will throw an exception and you'll see an "unsafe cpow usage forbidden” error in the browser console.
...however, if an add-on passes a cpow into a platform api, and that platform api then attempts an unsafe operation on it, this will throw an exception.
How to get a stacktrace with WinDbg
faq q: i am running windows 7 (32-bit or 64-bit) and i see an exception in the windbg command window that says 'ntdll32!ldrpdodebuggerbreak+0x2c' or 'ntdll32!ldrpdodebuggerbreak+0x30'.
... a: if you see 'int 3' after either of those exceptions, you will need to execute the following commands in windbg.
CustomizableUI.jsm
customizableui will catch exceptions.
... callers should ensure that no matter what happens they call endbatchupdate once for each call to beginbatchupdate, even if there are exceptions in the code in the batch update.
FileUtils.jsm
starting in gecko 38.0, passing mode_append without mode_truncate will throw an exception.
... starting in gecko 38.0, passing mode_append without mode_truncate will throw an exception.
OS.File for the main thread
you may pass an object with a subset of the following fields: nooverwrite if destpath already exists, do not overwrite it, but rather launch an exception.
...you may pass an object with a subset of the following fields: nooverwrite if destpath already exists, do not overwrite it, but rather launch an exception.
PromiseWorker.jsm
throw new customerror('meow'); } the converted message will be posted back to the main thread, and it will be converted again to error object, with frommsg function specified for the error in exceptionhandlers property.
...myworker.exceptionhandlers['customerror'] = customerror.frommsg; this is seen in a simple demo at github :: promiseworker custom errors demo - worker side setup.
Mozilla DOM Hacking Guide
static nsresult throwjsexception(jscontext *cx, nsresult aresult);: help me!
...a bad conversion exception would be thrown.
A brief guide to Mozilla preferences
the only exception to this is user.js .
...the exception to this is a preference read using sticky_pref() - these preference will be written whenever the preference has a user value even when it is the same as the default.
PR_Poll
the in_flags field of the prpolldesc data structure should be set to the i/o events (readable, writable, exception, or some combination) that the caller is interested in.
... pr_poll_except: fd has an exception condition.
Rhino Debugger
break to stop all running scripts and give control to the debugger you may do any of the following: select the debug->break menu item on the menu bar press the break button on the toolbar press the pause/break key on the keyboard break on exceptions to give control to the debugger whenever a javascript is exception is thrown select the debug->break on exceptions checkbox from the menu bar.
... whenever a javascript exception is thrown by a script a message dialog will be displayed and control will be given to the debugger at the location the exception is raised.
Rhino scopes and contexts
remember to put the exit() call in a finally block if you're executing code that could throw an exception.
...any attempt to modify sealed object throws an exception.
Rhino serialization
exceptions will be thrown if foo or foo.prototype cannot be found the scopes used in either scriptableoutputstream or scriptableinputstream.
...however, you can run into problems with serialization of compiled functions and scripts: $ cat test.jsfunction f() { return 3; } serialize(f, "f.ser"); g = deserialize("f.ser"); print(g()); $ java org.mozilla.javascript.tools.shell.main -opt -1test.js 3 $ java org.mozilla.javascript.tools.shell.main test.js js: uncaught javascript exception: java.lang.classnotfoundexception:c1 the problem is that java serialization has no built-in way to serialize java classes themselves.
Rhino shell
seal(object) seal the specified object so any attempt to add, delete or modify its properties would throw an exception.
... js> runcommand("bad_command", "--bad-arg", opt) js: "<stdin>", line 18: uncaught javascript exception: java.io.ioexception: bad_command: not found js> // passing explicit environment to the system shell js> runcommand("sh", "-c", "echo $env1 $env2", { env: {env1: 100, env2: 200}}) 100 200 0 js> // use args option to provide additional command arguments js> var arg_array = [1, 2, 3, 4]; js> runcommand("echo", { args: arg_array}) 1 2 3 4 0 examples for windows are similar: js> // invoke shell co...
Invariants
there are the usual invariants regarding locks: we do not reenter them (it would be nice to check this as there might be an exception or two); we do not wait on a condition variable unless the corresponding lock is held.
... with a few exceptions (known to brendan and probably jst and mrbkap), we never call a jsapi callback with a property locked.
SpiderMonkey Internals
(otherwise, spidermonkey converts primitive values to objects before invoking their methods, per ecma 262-3 §11.2.1.) error handling spidermonkey has two interdependent error-handling systems: javascript exceptions (which are not implemented with, or even compatible with, any kind of native c/c++ exception handling) and error reporting.
... in general, both functions inside spidermonkey and jsapi callback functions signal errors by calling js_reporterror or one of its variants, or js_setpendingexception, and returning js_false or null.
JS_DefineProperty
(exception: if attrs contains the jsprop_readonly flag, the setter will never be called, as property assignment will fail before it gets that far.
...on error or exception, it returns false.
JS_SetBranchCallback
if the callback raises an exception using js_setpendingexception() and returns js_false, then the javascript engine propagates the exception to the script that was executing at the time.
... if the callback returns js_false without raising an exception, then the javascript engine immediately stops running the script with an uncatchable error.
JS_SetElement
on error or exception, js_setelement returns false.
...on error or exception, js_setelement returns false and the value left in *vp is unspecified.
JS_SetOptions
mxr id search for jsoption_native_branch_callback jsoption_dont_report_uncaught when returning from the outermost api call, prevent uncaught exceptions from being converted to error reports.
... mxr id search for jsoption_dont_report_uncaught jsoption_relimit added in spidermonkey 1.8 throw an exception if a regular expression backtracks more than n3 times, where n is the length of the input string.
JS_ThrowStopIteration
this article covers features introduced in spidermonkey js1.8 throw a stopiteration exception.
...the engine automatically catches the exception and exits the loop.
JS_ValueToNumber
if at any step an error or exception occurs, or conversion succeeds, the rest of the steps are skipped.
...on error or exception, it returns js_false, and the value left in *dp is undefined.
JS_ValueToSource
on error or exception, it returns null.
... this happens, for example, if v is an object and v.tosource() throws an exception.
JSAPI reference
ction added in spidermonkey 17 js_decompilefunction js_decompilefunctionbody js_compilefunction obsolete since jsapi 36 js_compilefunctionforprincipals obsolete since jsapi 28 js_compileucfunction obsolete since jsapi 36 js_compileucfunctionforprincipals obsolete since jsapi 28 error handling struct jserrorformatstring added in spidermonkey 17 class jserrorreport class js::autosaveexceptionstate added in spidermonkey 31 enum jsexntype added in spidermonkey 17 js_reporterror js_reportwarning js_reporterrornumber js_reporterrornumberuc js_reporterrorflagsandnumber js_reporterrorflagsandnumberuc js_reporterrornumberucarray added in spidermonkey 24 js_reportoutofmemory js_reportallocationoverflow added in spidermonkey 1.8 js_geterrorreporter js_seterrorreporterobsolete since...
... jsapi 52 js_errorfromexception js_geterrorprototype jsreport_is_exception jsreport_is_strict jsreport_is_warning jsreport_is_strict_mode_error the following functions allow c/c++ functions to throw and catch javascript exceptions: js::createerror added in spidermonkey 38 js_isexceptionpending js_getpendingexception js_setpendingexception js_clearpendingexception js_throwstopiteration added in spidermonkey 1.8 js_isstopiteration added in spidermonkey 31 typedef jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate these functions translate errors into exceptions and vice versa: js_reportpendingexception js_errorfromexception js_throwreportederror obsolete since jsapi 29 values and types typedef jsval js::value js::value con...
SpiderMonkey 1.8
the main difference is that js_reportallocationoverflow throws an exception which the application may catch.
... js_throwstopiteration throws the appropriate stopiteration exception object for the given context.
TPS Tests
logger.asserttrue(condition, msg) asserts that condition is true, otherwise an exception is thrown and the test fails.
... logger.assertequal(val1, val2, msg) asserts that val1 is equal to val2, otherwise an exception is thrown and the test fails.
Using components
var { cu: utils, ci: interfaces, cc: classes, cr: results, cs: stack, cm: manager, ce: exception, } = components; here is a full breakdown of what is contained in components.
...] issuccesscode=function issuccesscode() { [native code] } constructor=[object nsxpccomponents_constructor] queryinterface=function queryinterface() { [native code] } interfacesbyid=[object nsxpccomponents_interfacesbyid] classesbyid=[object nsxpccomponents_classesbyid] stack=js frame :: scratchpad/4 :: cdump :: line 8 manager=[xpconnect wrapped nsicomponentmanager] id=[object nsxpccomponents_id] exception=[object nsxpccomponents_exception] reporterror=function reporterror() { [native code] } cancreatewrapper=function cancreatewrapper() { [native code] } cancallmethod=function cancallmethod() { [native code] } cangetproperty=function cangetproperty() { [native code] } cansetproperty=function cansetproperty() { [native code] } ...
jsdIStackFrame
setting or getting this attribute on any other context will throw a ns_error_no_interface exception.
...once a jsdistackframe has been invalidated all method and property accesses will throw a ns_error_not_available exception.
nsIAccessibleImage
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
nsIAccessibleSelectable
exceptions thrown ns_error_failure if the specified object is not selectable.
... exceptions thrown ns_error_failure if the specified object is not selectable.
nsIAnnotationService
it throwns an exception if the annotation is not set.
...it throwns an exception if the annotation is not set.
nsIApplicationCacheChannel
exceptions thrown ns_error_already_opened if set after calling asyncopen() on the channel.
...exceptions thrown ns_error_already_opened if set after calling asyncopen() on the channel.
nsIAuthModule
exceptions thrown ns_error_not_implemented if the underlying authentication mechanism does not support security layers.
... exceptions thrown ns_error_not_implemented if the underlying authentication mechanism does not support security layers.
nsIAuthPrompt2
note: this method may throw any exception when the prompt fails to queue, for example because of out-of-memory error.
... note: exceptions thrown from this function will be treated like a return value of false.
nsIBidiKeyboard
exceptions thrown ns_error_failure if no right-to-left keyboards are installed.
... exceptions thrown ns_error_failure if no right-to-left keyboards are installed.
nsIBinaryInputStream
exceptions thrown ns_error_failure if it can't read alength bytes.
... exceptions thrown ns_error_failure if it can't read alength bytes.
nsICacheService
exceptions thrown ns_error_not_implemented this method is deprecated.
... exceptions thrown missing exception missing description shutdown() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) shutdown() the cache service.
nsICategoryManager
exceptions thrown ns_error_invalid_arg this error is returned if areplace is false and the category entry already has a value, or if apersist is true.
... exceptions thrown ns_error_not_available indicates that either the category or entry is undefined.
nsIChannel
exceptions thrown ns_error_already_opened if the channel is reopened ns_error_port_access_not_allowed if the specified port is in the nsioservice forbidden port list.
... exceptions thrown ns_error_in_progress if the channel is reopened.
nsICommandLine
exceptions thrown ns_error_invalid_arg the specified index is out of bounds.
...exceptions thrown ns_error_invalid_arg the specified flag has no value.
nsIConverterOutputStream
a value of 0x0000 will cause an exception to be thrown upon attempts to write unsupported characters.
... exceptions thrown ns_error_loss_of_significant_data if areplacementcharacter is not encodable in the selected character encoding and an attempt is made to write the character.
nsIDOMHTMLTimeRanges
exceptions thrown index_size_err the specified index is not valid.
...exceptions thrown index_size_err the specified index is not valid.
nsIDOMWindowUtils
exceptions thrown ns_error_not_available there is no current inner window displaydpi float the dpi of the display.
...if two or more key_flag_location_* is specified, this method will throw an exception.
nsIDroppedLinkHandler
exceptions thrown missing exception missing description droplink() given a drop event, determines the link being dragged.
... exceptions thrown ns_error_dom_security_err error will be thrown and the event canceled if the receiving target should not load the uri for security reasons.
nsIJetpack
special messages if an exception goes uncaught in the jetpack process, it will be reported to the chrome process via a message with the name core:exception.
... the message comes with one argument, which represents the exception object that was thrown.
nsINavBookmarksService
exceptions thrown invalid argument exception if it can not find a folder with the given id.
... exceptions thrown if anewindex is out of bounds.
nsIProtocolProxyService
when this flag is passed to resolve, resolve may throw the exception ns_base_stream_would_block to indicate that it failed due to this flag being present.
... exceptions thrown ns_error_not_available if there is no alternate proxy available.
nsIRequestObserver
note: an exception thrown from onstartrequest has the side-effect of causing the request to be canceled.
...note: an exception thrown from onstoprequest is generally ignored.
nsISHistory
exceptions thrown ns_ok history entry for the index is obtained successfully.
... exceptions thrown ns_error_failure numentries is invalid or out of bounds with the size of history.
nsIScriptError
exceptionflag 0x2 an exception was thrown for this case - exception-aware hosts can ignore this.
...as addon author i would recommend using "chrome javascript" for logging exceptions caused by addon code.
nsIScriptableUnescapeHTML
exceptions thrown ns_error_failure unable to append the text to the element.
... exceptions thrown ns_error_failure unable to convert the string.
nsIStringBundleOverride
an exception is thrown if the key has not been overridden.
... however, no exception is thrown if the original string bundle did not have the key.
nsIUTF8ConverterService
exceptions thrown ns_error_uconv_noconv when there is no decoder for acharset or error code of nsiunicodedecoder in case of conversion failure.
...exceptions thrown ns_error_uconv_noconv when there is no decoder for acharset or error code of nsiunicodedecoder in case of conversion failure.
nsIUUIDGenerator
exceptions thrown ns_error_failure if a uuid cannot be generated (for example if an underlying source of randomness is not available) native code only!generateuuidinplace obtain a new uuid like the generateuuid() method, but place it in the provided nsid pointer instead of allocating a new nsid.
... exceptions thrown ns_error_failure if a uuid cannot be generated (for example if an underlying source of randomness is not available) example generating a uuid var uuidgenerator = components.classes["@mozilla.org/uuid-generator;1"] .getservice(components.interfaces.nsiuuidgenerator); var uuid = uuidgenerator.generateuuid(); var uuidstring = uuid.tostring(); ...
nsIXmlRpcFault
extensions/xml-rpc/idl/nsixmlrpcclient.idlscriptable an xml-rpc exception.
... xml-rpc server fault codes are returned wrapped in this; access it using nsixpconnect.getpendingexception->data.
nsIZipReader
exceptions thrown ns_error_illegal_value on many but not all invalid apattern values.
...directory) { var inputstream = zr.getinputstream(entrypointer); reusablestreaminstance.init(inputstream); var filecontents = reusablestreaminstance.read(entry.realsize); console.log('contenst of file=', filecontents); } else { console.log('is directory, no stream to read'); } } } catch (ex) { console.warn('exception occured = ', ex); if (ex.name == 'ns_error_file_not_found') { services.ww.activewindow.alert('xpi at path does not exist!\n\npath = ' + pathtoxpitoread); } } finally { zr.close(); console.log('zr closed'); } see also nsizipentry nsizipwriter ...
XPCOM Interface Reference by grouping
ccessibletable nsiaccessibletext nsiaccessibletreecache nsiaccessiblevalue nsiaccessnode nsisyncmessagesender script nsiscriptableunescapehtml nsiscriptableunicodeconverter nsiscripterror nsiscripterror2 stylesheet nsistylesheetservice url nsiuri nsiurl util nsidomserializer nsidomxpathevaluator nsidomxpathexception nsidomxpathexpression nsidomxpathresult xslt nsixsltexception nsixsltprocessor download nsidownload nsidownloadmanager nsidownloadprogresslistener element internal nsiworker nsiworkerglobalscope nsiworkermessageevent nsiworkermessageport nsiworkerscope tree nsitreeboxobject nsitreecolumn nsitreecolumns ...
... nsiaccelerationlistener nsiaccelerometer misc nsisound nsiwifimonitor document nsiwebnavigation environment nsienvironment event nsieventlistenerinfo nsieventlistenerservice nsieventtarget exception nsiexception extention nsiextensionmanager nsiinstalllocation external nsiexternalprotocolservice frame nsicontentframemessagemanager history nsishentry nsishistory idle nsiidleservice internal ...
Storage
be aware that you should always reset even if an exception is thrown, so your code should look something like this: var statement = dbconn.createstatement("select * from table_name"); try { while (statement.step()) { // use the results...
... note: the database engine does not support nested transactions, so attempting to start a transaction when one is already active will throw an exception.
Getting Started Guide
nscomptr helps you write code that is leak-proof, exception safe, and significantly less verbose than you would with raw xpcom interface pointers.
...nscomptr is designed to be used with xpcom interfaces, so don't use it with non-interfaces with specific exceptions described below.
Using the Gecko SDK
a frozen gecko api is one that is included in the gecko and marked frozen with the text <tt>@status frozen</tt> (with nspr as the exception to the rule).
...(note: nspr is the one exception to this rule.
Index
85 error reporting tools thunderbird currently, thunderbird tends to eat a lot of exceptions.
...bug 493414), but in the meantime, it would be helpful to be able to get useful output on stderr about exceptions, events and pretty-printed objects.
Using tab-modal prompts
es here', input, 'check text, if no text, checkbox is not shown', check]); //this here is just an alert, showing the values of the prompt prompt.alert.apply(null, ['title not shown in modal', 'user clicked ok: ' + ok + '\n' + 'checked: ' + check.value + '\ninput value: ' + input.value]); note: because the prompts are shown in a tab, if the tab is closed while the prompt is open it will throw an exception.
... /* exception: prompt aborted by user undefined:425 */ ...
Declaring and Using Callbacks
k constructor, the second is used as the this parameter: function myjscallback() { alert(this.message); }; var receiver = { message: 'hi there!' }; var callback = funcptrtype(myjscallback, receiver); // alerts with 'hi there' when the callback is invoked if three arguments are passed to the callback constructor, the third argument is used as a sentinel value which the callback returns if an exception is thrown.
... the sentinel value must be convertible to the return type of the callback: function myjscallback() { throw "uh oh"; }; var callback1 = funcptrtype(myjscallback, null, -1); // returns -1 to the native caller when the exception is thrown.
Working with data
note: if type.size is undefined, creating a new object this way will throw a typeerror exception.
...join() will throw an exception if the resulting number exceeds 64 bits in length.
FunctionType
the equivalent c function type declaration would be: returntype (*) ([argtype1, ..., argtypen]); exceptions thrown typeerror abi is not a valid abi constants, or returntype or any of the argument types are not valid ctype objects.
... exceptions thrown typeerror func is not either pointer value or javascript function.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
dbg.uncaughtexceptionhook = handleuncaughtexception; // find the current tab's main content window.
... plot(log); } function handleuncaughtexception(ex) { console.log('debugger hook threw:'); console.log(ex.tostring()); console.log('stack:'); console.log(ex.stack); }; function plot(log) { // given the log, compute a map from allocation sites to // allocation counts.
Debugger.Object - Firefox Developer Tools
unless otherwise specified, these methods are not invocation functions; if a call would cause debuggee code to run (say, because it gets or sets an accessor property whose handler is debuggee code, or because the referent is a proxy whose traps are debuggee code), the call throws a debugger.debuggeewouldrun exception.
...if the referent is not a global object, throw a typeerror exception.
Index - Firefox Developer Tools
118 access debugging in add-ons the following items are accessible in the context of chrome://browser/content/debugger.xul (or, in version 23 beta, chrome://browser/content/devtools/debugger.xul): 119 breaking on exceptions when an exception occurs, the line where it occurs is highlighted in the source pane, with a squiggly red line under the problematic code.
... a tooltip describes the exception.
Animation.finish() - Web APIs
WebAPIAnimationfinish
exceptions invalidstate the player's playback rate is 0 or the animation's playback rate is greater than 0 and the end time of the animation is infinity.
... interfaceelement.addeventlistener("mousedown", function() { try { player.finish(); } catch(e if e instanceof invalidstate) { console.log("finish() called on paused or finished animation."); } catch(e); logmyerrors(e); //pass exception object to error handler } }); the following example finishes all the animations on a single element, regardless of their direction of playback.
AudioContext() - Web APIs
exceptions notsupportederror the specified samplerate isn't supported by the context.
... non-standard exceptions in chrome if the value of the latencyhint property isn't valid, chrome throws a typeerror exception with the message "the provided value '...' is not a valid enum value of type audiocontextlatencycategory".
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
otherwise, a notsupportederror exception is thrown.
... exceptions indexsizeerror the value specified as outputindex or inputindex doesn't correspond to an existing input or output.
AudioParam.setValueCurveAtTime() - Web APIs
every value in the array must be a finite number; if any value is nan, infinity, or -infinity, a typeerror exception is thrown.
... exceptions invalidstateerror the specified array of values has fewer than 2 items in it.
AudioWorkletNode.onprocessorerror - Web APIs
this occurs when the underlying audioworkletprocessor behind the node throws an exception in its constructor, the process method, or any user-defined class method.
... once an exception is thrown, the processor (and thus the node) will output silence throughout its lifetime.
CSSPrimitiveValue.getCounterValue() - Web APIs
if this css value doesn't contain a counter value, a domexception is raised.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a counter value (e.g.
CSSPrimitiveValue.getFloatValue() - Web APIs
if this css value doesn't contain a float value or can't be converted into the specified unit, a domexception is raised.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a float value or if the float value can't be converted into the specified unit.
CSSPrimitiveValue.getRGBColorValue() - Web APIs
if this css value doesn't contain a rgb color value, a domexception is raised.
... exceptions type description domexception an invalid_access_err is raised if the attached property can't return an rgb color value (i.e.
CSSPrimitiveValue.getRectValue() - Web APIs
if this css value doesn't contain a rect value, a domexception is raised.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a rect value.
CSSPrimitiveValue.getStringValue() - Web APIs
if this css value doesn't contain a string value, a domexception is raised.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a string value.
CSSPrimitiveValue.setFloatValue() - Web APIs
if the property attached to this value can't accept the specified unit or the float value, the value will be unchanged and a domexception will be raised.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a float value or if the string value can't be converted into the specified unit.
CSSPrimitiveValue.setStringValue() - Web APIs
if the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a domexception will be raised.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a string value or if the string value can't be converted into the specified unit.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
syntax stream.requestframe(); return value undefined usage notes there is currently an issue flagged in the specification pointing out that at this time, no exceptions are being thrown if the canvas isn't origin-clean.
... this may change in the future, so it would be wise to plan ahead and watch for exceptions such as securityerror (although the specific error that might be thrown is not mentioned in the spec, this is a likely candidate).
Crypto.getRandomValues() - Web APIs
exceptions this method can throw an exception under error conditions.
... domexception (name: quotaexceedederror) the requested length exceeds 65,536 bytes.
DOMMatrix - Web APIs
WebAPIDOMMatrix
otherwise, a typeerror exception is thrown.
...otherwise, a typeerror exception is thrown.
DirectoryReaderSync - Web APIs
if (!data.cmd || data.cmd != 'list') { return; } try { var fs = requestfilesystemsync(temporary, 1024*1024 /*1mb*/); getallentries(fs.root.createreader()); self.postmessage({entries: paths}); } catch (e) { onerror(e); } }; method overview entrysync readentries () raises (fileexception); method readentries() returns a lost of entries from a specific directory.
... entrysync readentries ( ) raises (fileexception); returns parameter none exceptions this method can raise a fileexception with the following codes: exception description not_found_err the directory does not exist.
Document.querySelector() - Web APIs
this string must be a valid css selector string; if it isn't, a syntax_err exception is thrown.
... exceptions syntax_err the syntax of the specified selectors is invalid.
Document.querySelectorAll() - Web APIs
this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
Document - Web APIs
WebAPIDocument
mozilla also define some non-standard methods: document.execcommandshowhelp()obsolete since gecko 14 this method never did anything and always threw an exception, so it was removed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11).
... document.querycommandtext()obsolete since gecko 14 this method never did anything but throw an exception, and was removed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11).
Document Object Model (DOM) - Web APIs
dom interfaces attr cdatasection characterdata childnode comment customevent document documentfragment documenttype domerror domexception domimplementation domstring domtimestamp domstringlist domtokenlist element event eventtarget htmlcollection mutationobserver mutationrecord namednodemap node nodefilter nodeiterator nodelist nondocumenttypechildnode parentnode processinginstruction selection range text textdecoder textencoder timeranges treewalker url window worker xmldocument obsolete do...
...eger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpathdata svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist smil-related interfaces elementtimecontrol timeevent other svg interfaces getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svglangspace svglocatable svgrenderingintent svgstylable svgtests svgtransformable svgunittypes svguseelementshadowroot svgurireference svgviewspec svgzoomandpan svgzoomevent specifications specification status comment dom living standard ...
Element.outerHTML - Web APIs
WebAPIElementouterHTML
exceptions syntaxerror an attempt was made to set outerhtml using an html string which is not valid.
...many browsers will also throw an exception.
Element.querySelector() - Web APIs
syntax element = baseelement.queryselector(selectors); parameters selectors a group of selectors to match the descendant elements of the element baseelement against; this must be valid css syntax, or a syntaxerror exception will occur.
... exceptions syntaxerror the specified selectors are invalid.
Element.querySelectorAll() - Web APIs
this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
Element.requestFullscreen() - Web APIs
exceptions rather than throw a traditional exception, the requestfullscreen() procedure announces error conditions by rejecting the promise it has returned.
... the rejection handler receives one of the following exception values: typeerror the typeerror exception may be delivered in any of the following situations: the document containing the element isn't fully active; that is, it's not the current active document.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
— 17notes notes before firefox 17, a call to this method after the dispatching of the event raised an exception instead of doing nothing.ie full support yesopera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android ...
...— 17notes notes before firefox 17, a call to this method after the dispatching of the event raised an exception instead of doing nothing.opera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full supportdeprecated.
EventTarget.dispatchEvent() - Web APIs
exceptions exceptions thrown by event handlers are reported as uncaught exceptions.
... the event handlers run on a nested callstack; they block the caller until they complete, but exceptions do not propagate to the caller.
FetchEvent.request - Web APIs
the code also handles exceptions thrown from the serviceworkerglobalscope.fetch operation.
... note that an http error response (e.g., 404) will not trigger an exception.
FileSystemDirectoryEntry.getDirectory() - Web APIs
for androidsafari on iossamsung internetgetdirectory experimentalchrome full support 8edge full support 79firefox full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android ...
... full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.opera android no support nosafari ios full support 11.3samsung internet android full support yeslegend full support full support no support no supportexperimental.
FileSystemDirectoryEntry.getFile() - Web APIs
opera for androidsafari on iossamsung internetgetfile experimentalchrome full support 8edge full support 79firefox full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android ...
... full support 50notes full support 50notes notes in firefox, the errorcallback's input parameter is a domexception rather than a fileerror object.opera android no support nosafari ios full support 11.3samsung internet android full support yeslegend full support full support no support no supportexperimental.
HTMLInputElement.stepDown() - Web APIs
if the form control is non time, date, or numeric in nature, and therefore does not support the step attribute (see the list of supported input types in the the table above), or if the step value is set to any, an invalidstateerror exception is thrown.
...throws an invalid_state_err exception: if the method is not applicable to for the current type value, if the element has no step value, if the value cannot be converted to a number, if the resulting value is above the max or below the min.
HTMLMediaElement.play() - Web APIs
exceptions the promise's rejection handler is called with an exception name passed in as its sole input parameter (as opposed to a traditional exception being thrown).
... other exceptions may be reported, depending on browser implementation details, media player implementation, and so forth.
HTMLMediaElement - Web APIs
note: automatically playing audio when the user doesn't expect or desire it is a poor user experience and should be avoided in most cases, though there are exceptions.
...using any other size results in an exception being thrown.
HTMLSelectElement.add() - Web APIs
exceptions a domerror of the type hierarchyrequesterror if the item passed to the method is an ancestor of the htmlselectelement.
... obsolete the method now throws an not_found_err exception if the item of the before parameter is not a child of this element.
History.pushState() - Web APIs
WebAPIHistorypushState
if you pass a state object whose serialized representation is larger than this to pushstate(), the method will throw an exception.
...the new url must be of the same origin as the current url; otherwise, pushstate() will throw an exception.
History - Web APIs
WebAPIHistory
calling this method to go back beyond the first page in the session history has no effect and doesn't raise an exception.
... calling this method to go forward beyond the most recent page in the session history has no effect and doesn't raise an exception.
IDBDatabase.transaction() - Web APIs
therefore the following lines are equivalent: var transaction = db.transaction(['my-store-name']); var transaction = db.transaction('my-store-name'); if you need to access all object stores in the database, you can use the property idbdatabase.objectstorenames: var transaction = db.transaction(db.objectstorenames); passing an empty array will throw an exception.
... exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror the close() method has previously been called on this idbdatabase instance.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
this throws an exception if either of the values is not a valid key.
... return value an integer that indicates the result of the comparison; the table below lists the possible values and their meanings: returned value description -1 1st key is less than the 2nd key 0 1st key is equal to the 2nd key 1 1st key is greater than the 2nd key exceptions this method may raise a domexception of the following types: attribute description dataerror one of the supplied keys was not a valid key.
IDBObjectStore.getAllKeys() - Web APIs
if it is lower than 0 or greater than 232-1 a typeerror exception will be thrown.
... exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbobjectstore's transaction is inactive.
IDBTransaction.commit() - Web APIs
if it is called on a transaction that is not active, it throws an invalidstateerror domexception.
... exceptions exception description invalidstateerror the transaction state is not active.
IDBTransaction.error - Web APIs
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
...a android full support 14safari ios full support 8samsung internet android full support 1.5 full support 1.5 no support 1.5 — 7.0prefixed prefixed implemented with the vendor prefix: webkitdomexception value instead of domerrorchrome full support 48edge full support ≤18firefox full support 58ie no support noopera full support yessafari no support ...
IDBTransaction - Web APIs
an uncaught exception in the request's success/error handler.
... idbtransaction.error read only returns a domexception indicating the type of error that occured when there is an unsuccessful transaction.
KeyframeEffect.setKeyframes() - Web APIs
two exceptional css properties are: float, which must be written as cssfloat since "float" is a reserved word in javascript.
... exceptions exception explanation typeerror one or more of the frames were not of the correct type of object, the keyframes were not loosely sorted by offset, or a keyframe existed with an offset of less than 0 or more than 1.
LocalFileSystem - Web APIs
returns void exceptions this method can raise an fileerror with the following code: exception description security_error the application does not have permission to access the file system interface.
... returns void exceptions this method can raise an fileerror with the following code: exception description encoding_err the syntax of the url was invalid.
Location: assign() - Web APIs
WebAPILocationassign
if the assignment can't happen because of a security violation, a domexception of the security_error type is thrown.
... if the provided url is not valid, a domexception of the syntax_error type is thrown.
Location: replace() - Web APIs
WebAPILocationreplace
if the assignment can't happen because of a security violation, a domexception of the security_error type is thrown.
... if the provided url is not valid, a domexception of the syntax_error type is thrown.
MediaDevices.getDisplayMedia() - Web APIs
exceptions rejections of the returned promise are made by passing a domexception error object to the promise's failure handler.
... possible errors are: aborterror an error or failure that doesn't match any of the other exceptions below occurred.
MediaRecorder.start() - Web APIs
exceptions errors that can be detected immediately are thrown as dom exceptions.
...this exception may also be delivered as an error event if the security options for the source media change after recording begins.
MediaRecorderErrorEvent - Web APIs
it is an event object that encapsulates a reference to a domexception describing the error that occurred.
... error read only a domexception containing information about the error that occurred.
MediaSource.duration - Web APIs
exceptions the following exceptions may be thrown when setting a new value for this property.
... exception explanation invalidaccesserror an attempt was made to set a duration value that was negative, or nan.
Capabilities, constraints, and settings - Web APIs
there are exceptions, and we'll get to those shortly.
...if either call to json.parse() throws an exception, handleerror() is called to output the error message to the log.
Navigator.getBattery() - Web APIs
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: securityerror the user agent does not expose battery information to insecure contexts and this method was called from insecure context.
... notallowederror note: no user agent currently throws this exception, but the specification describes the following behaviors: this document is not allowed to use this feature.
Node - Web APIs
WebAPINode
in some cases, a particular feature of the base node interface may not apply to one of its child interfaces; in that case, the inheriting node may return null or throw an exception, depending on circumstances.
... for example, attempting to add children to a node type that cannot have children will throw an exception.
NodeIterator.detach() - Web APIs
once this method had been called, calls to other methods on nodeiterator would raise the invalid_state_err exception.
... syntax nodeiterator.detach(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodeiterator.detach(); // detaches the iterator nodeiterator.nextnode(); // throws an invalid_state_err exception specifications specification status comment domthe definition of 'nodeiterator.detach' in that specification.
ParentNode.querySelector() - Web APIs
this string must be a valid compound selector list supported by the browser; if it's not, a syntaxerror exception is thrown.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
ParentNode.querySelectorAll() - Web APIs
this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
PaymentRequest.show() - Web APIs
exceptions aborterror the returned promise rejects with an aborterror if the user agent is already showing a payment panel.
... if any fields have unacceptable values, or if an exception is thrown by the previous code, complete() is called with the string "fail", which indicates that the payment process is complete and failed.
PaymentResponse.complete() - Web APIs
if an error occurs, the promise instead rejects, returning one of the exceptions listed below.
... exceptions aborterror the document in which the payment request is taking place became inactive while the user interface was shown.
Using the Payment Request API - Web APIs
recommending a payment app when user has no apps if you select to pay with the bobpay demo payment provider on this merchant page, it tries to call paymentrequest.show(), while intercepting the notsupportederr exception.
...for this demo, simulate immediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }).catch(function(error) { if (error.code == domexception.not_supported_err) { window.location.href = 'https://bobpay.xyz/#download'; } else { // other kinds of errors; cancelled or failed payment.
RTCError - Web APIs
WebAPIRTCError
it's based upon the standard domexception interface that describes general dom errors.
... properties in addition to the properties defined by the parent interface, domexception, rtcerror includes the following properties: errordetail read only a domstring specifying the webrtc-specific error code identifying the type of error that occurred.
RTCIceCandidate.RTCIceCandidate() - Web APIs
if any of the fields is invalid, parsing of the string silently aborts without throwing an exception.
... exceptions typeerror the specified rtcicecandidateinit has values of null in both the sdpmid and sdpmlineindex properties.
RTCIceCandidate.protocol - Web APIs
protocol is null by default if not specified properly in the sdp, but this is an error condition and will result in a thrown exception when you call rtcpeerconnection.addicecandidate().
... note: if protocol is null — and protocol is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCPeerConnection.addIceCandidate() - Web APIs
receives as input a domexception object describing why failure occurred.
... exceptions when an error occurs while attempting to add the ice candidate, the promise returned by this method is rejected, returning one of the errors below as the name attribute in the specified domexception object passed to the rejection handler.
RTCPeerConnection.getStats() - Web APIs
exceptions this method does not throw exceptions; instead, it rejects the returned promise with one of the following errors: invalidaccesserror there is no rtcrtpsender or rtcrtpreceiver whose track matches the specified selector, or selector matches more than one sender or receiver.
...the callback receives as input the exception (a domexception object describing the error which occurred.
RTCPeerConnection.setLocalDescription() - Web APIs
it is passed a single domexception object explaining why the request failed.
... deprecated exceptions when using the deprecated callback-based version of setlocaldescription(), the following exceptions may occur: invalidstateerror the connection's signalingstate is "closed", indicating that the connection is not currently open, so negotiation cannot take place.
RTCRtpTransceiver.direction - Web APIs
exceptions when setting the value of direction, the following exceptions can occur: invalidstateerror either the receiver's rtcpeerconnection is closed or the rtcrtpreceiver is stopped.
... usage notes setting the direction when you change the value of direction, an invalidstateerror exception will occur if the connection is closed or the receiver is stopped.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
return value undefined exceptions invalidaccesserror the codecs list includes one or more codecs which are not supported by the transceiver.
...if any unsupported codecs are listed, the browser will throw an invalidaccesserror exception when you call this method.
SVGAnimationElement - Web APIs
if there is no current interval, then a domexception with code invalid_state_err is thrown.
...if the simple duration is undefined (e.g., the end time is indefinite), then a domexception with code not_supported_err is raised.
SVGMarkerElement - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is read only.
SVGMatrix - Web APIs
WebAPISVGMatrix
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions a domexception with the code no_modification_allowed_err is raised when attempting updating a read-only attribute or when the object itself is read-only.
SVGNumber - Web APIs
WebAPISVGNumber
an svgnumber object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: if the svgnumber is read-only, a domexception with the code no_modification_allowed_err is raised on an attempt to change the value.
SVGPreserveAspectRatio - Web APIs
an svgpreserveaspectratio object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised on an attempt to change the value of an attribute on a read only object.
SensorErrorEvent.SensorErrorEvent() - Web APIs
syntax sensorerrorevent = new sensorerrorevent(type, {error: domexception}); parameters type will always be 'sensorerrorevent'.
... options optional currently only one option is supported: error: an instance of domexception.
SensorErrorEvent.error - Web APIs
the error read-only property of the sensorerrorevent interface returns the domexception object passed in the event's contructor.
... syntax var domexception = sensorerrorevent.error; value a domexception.
ServiceWorkerGlobalScope.onfetch - Web APIs
the code also handles exceptions thrown from the fetch() operation.
... note that an http error response (e.g., 404) will not trigger an exception.
ServiceWorkerGlobalScope - Web APIs
the code also handles exceptions thrown from the fetch() operation.
... note that an http error response (e.g., 404) will not trigger an exception.
SourceBuffer.appendWindowEnd - Web APIs
exceptions the following exceptions may be thrown when setting a new value for this property.
... exception explanation invalidaccesserror an attempt was made to set the value to less than or equal to sourcebuffer.appendwindowstart, or nan.
SourceBuffer.appendWindowStart - Web APIs
exceptions the following exceptions may be thrown when setting a new value for this property.
... exception explanation invalidaccesserror an attempt was made to set the value to less than 0, or a value greater than or equal to sourcebuffer.appendwindowend.
SourceBuffer.timestampOffset - Web APIs
exceptions the following exceptions may be thrown when setting a new value for this property.
... exception explanation invalidstateerror one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e.
SourceBuffer.trackDefaults - Web APIs
exceptions the following exceptions may be thrown when setting a new value for this property.
... exception explanation invalidstateerror one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
exceptions setitem() may throw an exception if the storage is full.
...(safari sets the quota to 0 bytes in private mode, unlike other browsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem().
Storage Access API - Web APIs
in the case of breakage, site owners have often encouraged users to add their site as an exception or to disable the policy entirely.
...</iframe> the api is designed to limit the potential storage exceptions to origins for which the user has shown an intent to interact.
Writing a WebSocket server in Java - Web APIs
here's an implementation split into parts: import java.io.ioexception; import java.io.inputstream; import java.io.outputstream; import java.net.serversocket; import java.net.socket; import java.security.messagedigest; import java.security.nosuchalgorithmexception; import java.util.base64; import java.util.scanner; import java.util.regex.matcher; import java.util.regex.pattern; public class websocket { public static void main(string[] args) throws ioexception, nos...
...uchalgorithmexception { serversocket server = new serversocket(80); try { system.out.println("server has started on 127.0.0.1:80.\r\nwaiting for a connection..."); socket client = server.accept(); system.out.println("a client connected."); socket methods: java.net.socket getinputstream() returns an input stream for this socket.
Lighting a WebXR setting - Web APIs
obviously, there are exceptions to this guideline, such as when your scene represents an otherworldly or alien setting, or when your goal is to create an unsettling visual effect.
...there are exceptions, such as the ambient lighting that simply adds a baseline amount of lighting to your setting, and the sun, which is a directional light (that is, a light source where every light ray is parallel, coming from somewhere in the sky and ending somewhere within your scene).
Using the Web Storage API - Web APIs
however, just asserting that that property exists may throw exceptions.
... here is a function that detects whether localstorage is both supported and available: function storageavailable(type) { var storage; try { storage = window[type]; var x = '__storage_test__'; storage.setitem(x, x); storage.removeitem(x); return true; } catch(e) { return e instanceof domexception && ( // everything except firefox e.code === 22 || // firefox e.code === 1014 || // test name field too, because code might not be present // everything except firefox e.name === 'quotaexceedederror' || // firefox e.name === 'ns_error_dom_quota_reached') && // acknowledge quotae...
The structured clone algorithm - Web APIs
things that don't work with structured clone function objects cannot be duplicated by the structured clone algorithm; attempting to throws a data_clone_err exception.
... cloning dom nodes likewise throws a data_clone_err exception.
Web Workers API - Web APIs
you can run whatever code you like inside the worker thread, with some exceptions.
... in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel attributes on xmlhttprequest always return null.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
by setting the mozbackgroundrequest property of the request object and modifying the example appropriately, you can create your own alert dialog to handle ssl exceptions in your firefox extension or xulrunner application.
... try { errorclass = nsserrorsservice.geterrorclass(status); } catch (ex) { //catching security protocol exception errorclass = 'securityprotocol'; } if (errorclass == nsinsserrorsservice.error_class_bad_cert) { errtype = 'securitycertificate'; } else { errtype = 'securityprotocol'; } // nss_sec errors (happen below the base value because of negative vals) if ((status & 0xffff) < math.abs(nsinsserrorsservice.nss_sec_error_base)) { // the bases...
XMLSerializer.serializeToString() - Web APIs
exceptions typeerror the specified rootnode is not a compatible node type.
... the following types are also permitted as descendants of the root node, in addition to node and attr: documenttype document documentfragment element comment text processinginstruction attr if any other type is encountered, a typeerror exception is thrown.
XPathEvaluator.createExpression() - Web APIs
exceptions invalid_expression_err if the expression is not legal according to the rules of the xpathevaluator, an xpathexception of type invalid_expression_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XPathResult.iterateNext() - Web APIs
exceptions type_err in case xpathresult.resulttype is not unordered_node_iterator_type or ordered_node_iterator_type, an xpathexception of type type_err is thrown.
... invalid_state_err if the document is mutated since the result was returned, an xpathexception of type invalid_state_err is thrown.
XRSession.updateRenderState() - Web APIs
exceptions this method may throw any of the following exceptions.
... these are true exceptions, since this method does not return a promise.
XRSystem: isSessionSupported() - Web APIs
if the no devices are available or the browser doesn't have permission to use the xr device, the promise is rejected with an appropriate domexception.
... exceptions rather than throwing true exceptions, issessionsupported() rejects the returned promise, passing to the rejection handler a domexception whose name is one of the following strings.
Cognitive accessibility - Accessibility
timed content should also be avoided, with exceptions for non-interactive synchronized media and real-time events.
...the exception to this is preserving data for more than 20 hours when no actions are taken.
Getting Started - Developer guides
in the event of a communication error (such as the server going down), an exception will be thrown in the onreadystatechange method when accessing the response status.
... to mitigate this problem, you could wrap your if...then statement in a try...catch: function alertcontents() { try { if (httprequest.readystate === xmlhttprequest.done) { if (httprequest.status === 200) { alert(httprequest.responsetext); } else { alert('there was a problem with the request.'); } } } catch( e ) { alert('caught exception: ' + e.description); } } step 4 – working with the xml response in the previous example, after receiving the response to the http request we used the request object's responsetext property , which contained the contents of the test.html file.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
even if the above attributes are present, with the exception of required, and empty string will not lead to an error.
...aliditystate.typemismatch validitystate.patternmismatch validitystate.toolong validitystate.tooshort validitystate.rangeunderflow validitystate.rangeoverflow validitystate.stepmismatch validitystate.badinput validitystate.valid validitystate.customerror for each of these boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
WebHTMLElementnoframes
although most commonly-used browsers support frames, there are exceptions, including certain special-use browsers including some mobile browsers, as well as text-mode browsers.
... a <noframes> element can contain any html elements that are allowed within the body of an html document, with the exception of the <frameset> and <frame> elements, since using frames when they aren't supported doesn't make sense.
MIME types (IANA media types) - HTTP
mime types are case-insensitive but are traditionally written in lowercase, with the exception of parameter values, whose case may or may not have specific meaning.
... with the exception of multipart/form-data, used in the post method of html forms, and multipart/byteranges, used with 206 partial content to send part of a document, http doesn't handle multipart documents in a special way: the message is transmitted to the browser (which will likely show a "save as" window if it doesn't know how to display the document).
Content-Security-Policy - HTTP
with a few exceptions, policies mostly involve specifying server origins and script endpoints.
... the exception to this is if the worker script's origin is a globally unique identifier (for example, if its url has a scheme of data or blob).
HTTP response status codes - HTTP
WebHTTPStatus
this has the same semantics as the 302 found http response code, with the exception that the user agent must not change the http method used: if a post was used in the first request, a post must be used in the second request.
...this has the same semantics as the 301 moved permanently http response code, with the exception that the user agent must not change the http method used: if a post was used in the first request, a post must be used in the second request.
Equality comparisons and sameness - JavaScript
object.defineproperty(number, 'negative_zero', { value: -0, writable: false, configurable: false, enumerable: false }); function attemptmutation(v) { object.defineproperty(number, 'negative_zero', { value: v }); } object.defineproperty will throw an exception when attempting to change an immutable property, but it does nothing if no actual change is requested.
... we can see that with double and triple equals, with the exception of doing a type check upfront in 11.9.6.1, the strict equality algorithm is a subset of the abstract equality algorithm, because 11.9.6.2–7 correspond to 11.9.3.1.a–f.
Concurrency model and the event loop - JavaScript
legacy exceptions exist like alert or synchronous xhr, but it is considered a good practice to avoid them.
... beware: exceptions to the exception do exist (but are usually implementation bugs, rather than anything else).
Expressions and operators - JavaScript
the sole exceptions to type conversion within comparisons involve the === and !== operators, which perform strict equality and inequality comparisons.
...for example, when catching exceptions, you can branch to different exception-handling code depending on the type of exception thrown.
Grammar and types - JavaScript
an attempt to access an undeclared variable results in a referenceerror exception being thrown: var a; console.log('the value of a is ' + a); // the value of a is undefined console.log('the value of b is ' + b); // the value of b is undefined var b; // this one may puzzle you until you read 'variable hoisting' below console.log('the value of c is ' + c); // uncaught referenceerror: c is not defined let x; console.log('the value of x is ' + x); // the value of x is undefine...
... if (true) { let y = 5; } console.log(y); // referenceerror: y is not defined variable hoisting another unusual thing about variables in javascript is that you can refer to a variable declared later, without getting an exception.
Using Promises - JavaScript
error propagation you might recall seeing failurecallback three times in the pyramid of doom earlier, compared to only once at the end of the promise chain: dosomething() .then(result => dosomethingelse(result)) .then(newresult => dothirdthing(newresult)) .then(finalresult => console.log(`got the final result: ${finalresult}`)) .catch(failurecallback); if there's an exception, the browser will look down the chain for .catch() handlers or onrejected.
... promises solve a fundamental flaw with the callback pyramid of doom, by catching all errors, even thrown exceptions and programming errors.
TypeError: can't access dead object - JavaScript
the javascript exception "can't access dead object" occurs when firefox disallows add-ons to keep strong references to dom objects after their parent document has been destroyed to improve in memory usage and to prevent memory leaks.
... if (components.utils.isdeadwrapper(window)) { // dead } unprivileged code has no access to component.utils and might just be able catch the exception.
TypeError: "x" is not a constructor - JavaScript
the javascript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor, but that object or variable is not a constructor.
... this is not legal (the promise constructor is not being called correctly) and will throw a typeerror: this is not a constructor exception: return new promise.resolve(true); instead, use the promise.resolve() or promise.reject() static methods: // this is legal, but unnecessarily long: return new promise((resolve, reject) => { resolve(true); }) // instead, return the static method: return promise.resolve(true); return promise.reject(false); ...
Function.prototype.apply() - JavaScript
note: many older browsers—including chrome <17 and internet explorer <9—don't accept array-like objects, and will throw an exception.
...some engines will throw an exception.
InternalError() constructor - JavaScript
the name of the file containing the code that caused the exception linenumber optional.
... the line number of the code that caused the exception examples creating a new internalerror new internalerror("engine failure"); specifications not part of any standard.
Object.assign() - JavaScript
console.log(obj); // { "0": "a", "1": "b", "2": "c" } exceptions will interrupt the ongoing copying task const target = object.defineproperty({}, 'foo', { value: 1, writable: false }); // target.foo is a read-only property object.assign(target, { bar: 2 }, { foo2: 3, foo: 3, foo3: 3 }, { baz: 4 }); // typeerror: "foo" is read-only // the exception is thrown when assigning target.foo console.log(target.bar); // 2, the first source was copied successful...
...console.log(target.foo); // 1, exception is thrown here.
Object.prototype.constructor - JavaScript
description all objects (with the exception of objects created with object.create(null)) will have a constructor property.
...*/ } function createdconstructor() { parent.call(this) } createdconstructor.prototype = object.create(parent.prototype) createdconstructor.prototype.create = function create() { return new this.constructor() } new createdconstructor().create().create() // typeerror undefined is not a function since constructor === parent in the example above the exception will be shown since the constructor links to parent.
handler.defineProperty() - JavaScript
if a property has a corresponding target object property then object.defineproperty(target, prop, descriptor) will not throw an exception.
... in strict mode, a false return value from the defineproperty() handler will throw a typeerror exception.
ReferenceError() constructor - JavaScript
the name of the file containing the code that caused the exception.
...the line number of the code that caused the exception.
TypeError() constructor - JavaScript
the name of the file containing the code that caused the exception linenumber optional optional.
... the line number of the code that caused the exception examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console...
TypedArray.prototype.set() - JavaScript
all values from the source array are copied into the target array, unless the length of the source array plus the offset exceeds the length of the target array, in which case an exception is thrown.
... exceptions a rangeerror, if the offset is set such as it would store beyond the end of the typed array.
URIError() constructor - JavaScript
the name of the file containing the code that caused the exception.
...the line number of the code that caused the exception.
WebAssembly.CompileError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception.
... linenumber optional the line number of the code that caused the exception.
WebAssembly.LinkError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception.
... linenumber optional the line number of the code that caused the exception.
WebAssembly.RuntimeError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception.
... linenumber optional the line number of the code that caused the exception.
WebAssembly.instantiate() - JavaScript
exceptions if either of the parameters are not of the correct type or structure, a typeerror is thrown.
... exceptions if either of the parameters are not of the correct type or structure, a typeerror is thrown.
delete operator - JavaScript
exceptions throws typeerror in strict mode if the property is an own non-configurable property.
...bal property using: object.getownpropertydescriptor(window, 'nameother'); // output: object {value: "xyz", // writable: true, // enumerable: true, // configurable: false} // since "nameother" is added using with the // var keyword, it is marked as "non-configurable" delete nameother; // return false in strict mode, this would have raised an exception.
instanceof - JavaScript
examples demonstrating that string and date are of type object and exceptional cases the following code uses instanceof to demonstrate that string and date objects are also of type object (they are derived from object).
... however, objects created with the object literal notation are an exception here: although the prototype is undefined, instanceof object returns true.
typeof - JavaScript
using new operator // all constructor functions, with the exception of the function constructor, will always be typeof 'object' let str = new string('string'); let num = new number(100); typeof str; // it will return 'object' typeof num; // it will return 'object' let func = new function(); typeof func; // it will return 'function' need for parentheses in syntax // parentheses can be used for determining the data type of expressions.
... typeof undeclaredvariable === 'undefined'; typeof newletvariable; // referenceerror typeof newconstvariable; // referenceerror typeof newclass; // referenceerror let newletvariable; const newconstvariable = 'hello'; class newclass{}; exceptions all current browsers expose a non-standard host object document.all with type undefined.
yield - JavaScript
throw is used to throw an exception from the generator.
... this halts execution of the generator entirely, and execution resumes in the caller (as is normally the case when an exception is thrown).
Statements and declarations - JavaScript
throw throws a user-defined exception.
... try...catch marks a block of statements to try, and specifies a response, should an exception be thrown.
Strict mode - JavaScript
gnments, which would accidentally create global variables, instead throw an error in strict mode: 'use strict'; // assuming no global variable mistypedvariable exists mistypevariable = 17; // this line throws a referenceerror due to the // misspelling of variable second, strict mode makes assignments which would otherwise silently fail to throw an exception.
...in strict mode assigning to nan throws an exception.
<mstyle> - MathML
WebMathMLElementmstyle
it accepts all attributes of all mathml presentation elements with some exceptions and additional attributes listed below.
... the <mstyle> element accepts all attributes of all presentation elements with the following exceptions: height, depth or width do not apply to <mglyph>, <mpadded> or <mtable>.
Same-origin policy - Web security
exceptions in internet explorer internet explorer has two major exceptions to the same-origin policy: trust zones if both domains are in the highly trusted zone (e.g.
... these exceptions are nonstandard and unsupported in any other browser.
Cross-domain Content Scripts - Archive of obsolete content
suppose your content script includes a line like: // content-script.js: unsafewindow.mycustomapi = function () {}; if you have included the "cross-domain-content" key, when the page script tries to access mycustomapi this will result in a "permission denied" exception.
self - Archive of obsolete content
the exception is the context-menu module, which still uses postmessage.
Content Scripts - Archive of obsolete content
the exception is the context-menu module, which still uses postmessage.
Module structure of the SDK - Archive of obsolete content
so a if you import a module using require, you can't change the properties of the object returned: self = require("sdk/self"); // attempting to define a new property // will fail, or throw an exception in strict mode self.foo = 1; // attempting to modify an existing property // will fail, or throw an exception in strict mode self.data = "foo"; using modules from outside the add-on sdk you can use commonjs modules outside the add-on sdk, in any environment where you can use components.utils.import.
request - Archive of obsolete content
with the exception of response, all of a request object's properties correspond with the options in the constructor.
io/file - Archive of obsolete content
if the directory is not empty, an exception is thrown.
loader/sandbox - Archive of obsolete content
evaluate code module provides evaluate function that lets you execute code in the given sandbox: evaluate(scope, 'var a = 5;'); evaluate(scope, 'a + 2;'); //=> 7 more details about evaluated script may be passed via optional arguments that may improve exception reporting: // evaluate code as if it was loaded from 'http://foo.com/bar.js' and // start from 2nd line.
system/unload - Archive of obsolete content
if object does not have the expected destructor method, then an exception is thrown when ensure() is called.
system/xul-app - Archive of obsolete content
with the exception of ids, each of these properties exposes the attribute of the same name on the nsixulappinfo interface.
ui/button/action - Archive of obsolete content
after that, any attempts to access any of its properties or to call any of its methods will throw exceptions.
ui/button/toggle - Archive of obsolete content
after that, any attempts to access any of its properties or to call any of its methods will throw exceptions.
util/match-pattern - Archive of obsolete content
the matchpattern constructor will throw an exception if you try to set any of these flags.
window/utils - Archive of obsolete content
the exception is the windows() function which returns an array of currently opened windows.
Unit Testing - Archive of obsolete content
the second function tests the module's error-handling code by passing an empty string into atob() and using assert.throws() to check that the expected exception is raised.
JS XPCOM - Archive of obsolete content
determining which interfaces an xpcom component supports to display a list of all interfaces that an xpcom component supports, do the following: // |c| is the xpcom component instance for each (i in components.interfaces) { if (c instanceof i) { alert(i); } } in this context, instanceof is the same as queryinterface except that it returns false instead of throwing an exception when |c| doesn't support interface |i|.
Common Pitfalls - Archive of obsolete content
the one exception to all of the above, that is the one case in which creating a specific uri class via createinstance is acceptable, is when one is implementing a protocol handler's newuri method.
Default Preferences - Archive of obsolete content
doing so will cause mozilla to stop processing your preferences file without any notification, warning, error, or exception.
Jetpack Processes - Archive of obsolete content
core:exception(error) when an exception occurs in a jetpack script and is not caught, this message is sent to the parent.
Appendix F: Monitoring DOM changes - Archive of obsolete content
while these are not exceptionally efficient (they run for every http request, and considerably more often for some methods), they work very well for certain applications pure css pure css can be more powerful than most people suspect.
Getting Started with Firefox Extensions - Archive of obsolete content
installing, uninstalling, enabling and disabling add-ons require a restart to complete, with the exception of npapi plugins, add-ons sdk extensions and bootstrapped extensions.
Handling Preferences - Archive of obsolete content
{ return this._prefservice.getintpref("extensions.xulschoolhello.message.count"); }, increment : function() { let currentcount = this._prefservice.getintpref("extensions.xulschoolhello.message.count"); this._prefservice.setintpref("extensions.xulschoolhello.message.count", currentcount + 1); } one important thing to keep in mind is that the "get" methods of the service can throw an exception if the preference is not found.
Intercepting Page Loads - Archive of obsolete content
there may be other cases where accessing this property will throw an exception.
Local Storage - Archive of obsolete content
note: we recommend that all exception catch blocks include some logging at the error or warn levels, and in general you should use logging freely in order to have as much information as possible to fix bugs and know what is going on.
The Box Model - Archive of obsolete content
a common exception to this rule is when your css is directly related to images, where you'll usually handle measurements in pixels (px).
Extensions support in SeaMonkey 2 - Archive of obsolete content
there are exceptions, but these are few and far between.
Tabbed browser - Archive of obsolete content
e as browser var above //can stylize tab like atab.style.backgroundcolor = 'blue'; //can stylize the tab like atab.style.fontcolor = 'red'; var browser = atab.linkedbrowser; //this is the browser within the tab //this is what the example in the previous section gives //end getting other useful stuff } else { components.utils.reporterror('exception: load context not found!!'); //this is likely no big deal as the channel proably has no associated window, ie: the channel was loading some resource.
Notes on HTML Reflow - Archive of obsolete content
there are exceptions to this rule: most notably, html tables may require more than one pass.
Same-origin policy for file: URIs - Archive of obsolete content
for cross-window dom access, each file is treated as a separate origin, with one exception: if a file is loaded from another file that would otherwise be able to load it following this same-origin policy, they are considered to have the same origin.
Error Console - Archive of obsolete content
for information about what javascript exceptions get logged into the error console, and how to make all exceptions get logged, read the article exception logging in javascript.
Java in Firefox Extensions - Archive of obsolete content
list[0] = mydir; var envconfig = envconfigclass.newinstance(); arglist[1] = envconfig; // call our constructor with our arguments var env = constructor.newinstance(arglist); be aware that liveconnect, while now actively supported by sun has only recently been reimplemented for use in mozilla, so there may still be some bugs (though many prior liveconnect bugs, such as try-catch not catching java exceptions, the failure of auto-converting javascript arrays properly, etc., have now been fixed).
Basics - Archive of obsolete content
exception()this method does stuff.
Twitter - Archive of obsolete content
errorthrown is an exception object, if one was thrown.
jspage - Archive of obsolete content
.nocache){var f="nocache="+new date().gettime();g=(g)?f+"&"+g:f; }var e=b.lastindexof("/");if(e>-1&&(e=b.indexof("#"))>-1){b=b.substr(0,e);}if(g&&a=="get"){b=b+(b.contains("?")?"&":"?")+g;g=null;}this.xhr.open(a.touppercase(),b,this.options.async); this.xhr.onreadystatechange=this.onstatechange.bind(this);this.headers.each(function(m,l){try{this.xhr.setrequestheader(l,m);}catch(n){this.fireevent("exception",[l,m]); }},this);this.fireevent("request");this.xhr.send(g);if(!this.options.async){this.onstatechange();}return this;},cancel:function(){if(!this.running){return this; }this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new browser.request();this.fireevent("cancel");return this;}});(function(){var a={}; ["get","post","put","delete","get","post","put","delete"].each(...
Mozilla Application Framework in Detail - Archive of obsolete content
its ability to render web content correctly is exceptional.
LIR - Archive of obsolete content
le conversions 108 i2q quad 64 bit sign-extend int to quad 109 ui2uq quad 64 bit zero-extend unsigned int to unsigned quad 110 q2i integer 64 bit truncate quad to int (removes the high 32 bits) 111 i2d double convert int to double 112 ui2d double convert unsigned int to double 113 d2i integer convert double to int (no exceptions raised) 114 dasq quad 64 bit interpret the bits of a double as a quad 115 qasd double 64 bit interpret the bits of a quad as a double overflow arithmetic 116 addxovi integer add int and exit on overflow 117 subxovi integer subtract int and exit on overflow 118 mulxovi integer multiply int and exit on overflow 119 addjovi ...
Reading textual data - Archive of obsolete content
if you do not want any replacement, you can specify 0x0000 as replacement character; that way, readstring will throw an exception when reaching unsupported bytes.
Frequently Asked Questions - Archive of obsolete content
for example we support svg exceptions and svgtransform objects.
Supporting private browsing mode - Archive of obsolete content
nsiobserverservice); this._os.addobserver(this, "private-browsing", false); this._os.addobserver(this, "quit-application", false); try { var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); this._inprivatebrowsing = pbs.privatebrowsingenabled; } catch(ex) { // ignore exceptions in older versions of firefox } }, observe : function (asubject, atopic, adata) { if (atopic == "private-browsing") { if (adata == "enter") { this._inprivatebrowsing = true; if (this.watcher && "onenterprivatebrowsing" in this._watcher) { this.watcher.onenterprivatebrowsing(); } } else if (adata == "exit") { this._inpr...
Abc Assembler Tests - Archive of obsolete content
findproperty compare_stricteq pushstring "null lessequals null" // testname pushtrue // expected pushnull pushnull lessequals // actual callpropvoid compare_stricteq 3 // use .try / .catch to catch typeerror // convert_o null .try { pushnull convert_o pop findproperty fail pushstring "convert_o null" pushstring "exception should have been thrown: typeerror: error #1009: cannot access a property or method of a null object reference." getlocal1 callpropvoid fail 3 jump finished_convert_o_null } .catch { getlocal0 pushscope setlocal2 // save typeerror findproperty compare_typeerror pushstring "convert_o null" // test name pushstring "t...
When To Use ifdefs - Archive of obsolete content
this rule has many exceptions, some of which are listed here: the code in editor/ui/ is built by the suite, standalone composer, and thunderbird, but it is considered application-specific.
Writing textual data - Archive of obsolete content
the last argument to init specifies that: 0x0000 means that writing unsupported characters throws an exception (with an error code of ns_error_loss_of_significant_data), and no data will be written.
Anonymous Content - Archive of obsolete content
exceptions to the rule are noted below.
Install script template - Archive of obsolete content
odes need some memory var err; // error return codes when we try and install to the current browser var errblock1; // error return codes when we try and do a secondary installation var errblock2 = 0; // global variable containing our secondary install location var secondaryfolder; //special error values used by the cycore developers (www.cycore.com) who helped make this install script var exceptionoccurederror = -4711; var winregisnullerror = -4712; var invalidrootkeyerror = -4713; var registrykeynotwritableerror = -4714; //initinstall block //the installation is initialized here -- if we fail here, cancel the installation // initinstall is quite an overloaded method, but i have invoked it here with three strings // which are globally defined err = initinstall(so...
How to Quit a XUL Application - Archive of obsolete content
components.interfaces.nsiappstartup.eforcequit : components.interfaces.nsiappstartup.eattemptquit; appstartup.quit(quitseverity); } </script> calling this function if there is an uncaught exception, to force the application to quit: <script> try { dosomething(); } catch (e) { quit(true); } </script> the "quit" menuitem should typically prompt the user if there is unsaved data: <menuitem label="quit" oncommand="quit(false);"/> ...
Index - Archive of obsolete content
ArchiveMozillaXULIndex
this content will be copied for each matching result (though see below for an exception) and inserted into the document.
Actions - Archive of obsolete content
this content will be copied for each matching result (though see below for an exception) and inserted into the document.
Multiple Rule Example - Archive of obsolete content
the only exception to this is that the container and member variables (those that are referred to in the uri attributes), must be the same in all rules.
Templates - Archive of obsolete content
there are some small exceptions however.
XPCOM Interfaces - Archive of obsolete content
if you call queryinterface() on an object and the requested interface is not supported by an object, an exception is thrown.
XUL accessibility guidelines - Archive of obsolete content
if the user were to tab to the "exceptions..." button they would hear "cookies {pause} exceptions {pause} button." the next tab would read "cookies {pause} keep until {pause} they expire {pause} one of three {pause} combobox." if the screen reader only read the label, then the user would have to guess what the "exceptions" button or the "keep until" combobox was referring to.
Building XULRunner with Python - Archive of obsolete content
unhandled exceptions are displayed in the javascript error console which can be opened usingxulrunner -jsconsole.
Archived Mozilla and build documentation - Archive of obsolete content
exception logging in javascript technical review completed.
2006-11-24 - Archive of obsolete content
he is receiving the following error: error: uncaught exception: [exception...
2006-11-24 - Archive of obsolete content
on how to interface with firefox using xpcom on a similar basis to how a developer can with internet explorer through it's com interface tutorals and references related to extension development tutorials on developing extensions which use the third party libraries for firefox references to mozilla api exposed javascript component + xmldocument not accessible a discussion on error: uncaught exception: permission denied to get property xmldocument.textcontent creating xpcom components a good discussion about "components.classes[cid] has no properties" error firefox http explanation about how firefox handles the http aspect meetings none during this week.
NPN_GetURLNotify - Archive of obsolete content
description npn_geturlnotify() works just like npn_geturl(), with one exception: npn_geturlnotify() notifies the plug-in instance upon successful or unsuccessful completion of the request by calling the plug-in's npp_urlnotify() function and passing it the notifydata value.
NPN_PostURLNotify - Archive of obsolete content
description npn_posturlnotify functions identically to npn_posturl, with these exceptions: npn_posturlnotify supports specifying headers when posting a memory buffer.
NPObject - Archive of obsolete content
functions npn_createobject() npn_retainobject() npn_releaseobject() npn_invoke() npn_invokedefault() npn_evaluate() npn_getproperty() npn_setproperty() npn_removeproperty() npn_hasproperty() npn_hasmethod() npn_setexception() see also npclass ...
NPAPI plugin reference - Archive of obsolete content
npn_setexception a plugin can call this function to indicate that a call to one of the plugin's npobjects generated an error.
Using workers in extensions - Archive of obsolete content
the refreshinformation() method is fairly similar to the previous versions, with two notable exceptions: if the ticker symbol has not been set yet, an exception is thrown (lines 4-6).
Using JavaScript Generators in Firefox - Archive of obsolete content
closegenerator(); // always have an extra yield at the end or you will see stopiteration // exceptions.
Debug - Archive of obsolete content
debug.setnonusercodeexceptions determines whether any try-catch blocks in this scope are to be treated by the debugger as user-unhandled.
Error.number - Archive of obsolete content
example the following example causes an exception to be thrown and displays the error code that is derived from the error number.
New in JavaScript 1.4 - Archive of obsolete content
new features in javascript 1.4 exception handling (throw and try...catch) in operator instanceof operator changed functionality in javascript 1.4 eval() changes (cannot be called indirectly and no longer a method of object) arguments not a property of functions deprecated function.arity in favor of function.length changes to liveconnect ...
New in JavaScript 1.5 - Archive of obsolete content
changed functionality in javascript 1.5 runtime errors are now reported as exceptions.
Reflect.enumerate() - Archive of obsolete content
exceptions a typeerror, if target is not an object.
LiveConnect Reference - Archive of obsolete content
jsexception the public class jsexception extends runtimeexception, and is thrown when javascript returns an error.
JavaArray - Archive of obsolete content
in addition, you can create a javaarray with an arbitrary data type using the newinstance method of the array class: public static object newinstance(class componenttype, int length) throws negativearraysizeexception description the javaarray object is an instance of a java array that is created in or passed to javascript.
JavaPackage - Archive of obsolete content
for example, the netscape package contains the package netscape.javascript; the netscape.javascript package contains the classes jsobject and jsexception.
Old Proxy API - Archive of obsolete content
if fix() returns undefined, the call throws a typeerror exception.
XForms Custom Controls - Archive of obsolete content
with rare exception, your control should only need to implement the nsixformsuiwidget interface.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
browsers such as netscape 7 will not render the flash plugin if the above kind of markup is used, because netscape 7 does not support activex or activex-based component invocations, with the exception of windows media player in netscape 7.1.
XQuery - Archive of obsolete content
notes for developers wishing to access xquery in their own extensions at present, the extension works simply by using liveconnect to work with berkeley db xml's java api (and via a java wrapper class which circumvents liveconnect's current inability to handle some types of java exceptions properly).
Using the DOM File API in chrome code - Extensions
if you pass a path to the file constructor from unprivileged code (such as web content), an exception will be thrown.
Audio for Web games - Game development
web audio api for games the web audio api is supported across all modern desktop and mobile browsers, with the exception of opera mini.
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
note that btoa() expects to be passed binary data, and will throw an exception if the given string contains any characters whose utf-16 representation occupies more than one byte.
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
unit of measure (e.g., kilometers in europe, miles in u.s.) text direction (e.g., european languages are left-to-right, arabic right-to-left) capitalization in latin script (e.g., english uses capitals for weekdays, spanish uses lowercase) adaptation of idioms (e.g., "raining cats and dogs" makes no sense when translated literally) use of register (e.g., in japanese respectful speech differs exceptionally from casual speech) number format (e.g., 10 000,00 in germany vs.
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
a signature can include: parameters and their types a return value and type exceptions that might be thrown or passed back information about the availability of the method in an object-oriented program (such as the keywords public, static, or prototype).
Syntax error - MDN Web Docs Glossary: Definitions of Web-related terms
an exception caused by the incorrect use of a pre-defined syntax.
MDN Web Docs Glossary: Definitions of Web-related terms
layer security) dtmf (dual-tone multi-frequency signaling) dynamic programming language dynamic typing e ecma ecmascript effective connection type element empty element encapsulation encryption endianness engine entity entity header event exception expando f fallback alignment falsy favicon fetch directive fetch metadata request header firefox os firewall first contentful paint first cpu idle first input delay first interactive first meaningful paint first paint first-class function ...
Mobile accessibility - Learn web development
there are some exceptions that need special consideration for mobile; the main ones are: control mechanisms — make sure interface controls such as buttons are accessible on mobiles (i.e., mainly touchscreen), as well as desktops/laptops (mainly mouse/keyboard).
Organizing your CSS - Learn web development
instead, you could use the selector .box to apply your rule to any element that has the class box: .box { border: 1px solid #ccc; } there will be times when making something more specific makes sense, however this will generally be an exception rather than usual practice.
What do common web layouts contain? - Learn web development
there are complex designs and exceptions, of course.
The HTML5 input types - Learn web development
we'll note any exceptions.
Sending form data - Learn web development
no exception.
Styling web forms - Learn web development
they all do, with a strange exception — <input type="submit"> does not inherit from the parent paragraph in chrome.
Document and website structure - Learn web development
the homepage will probably be in the center, and link to most if not all of the others; most of the pages in a small site should be available from the main navigation, although there are exceptions.
Marking up a letter - Learn web development
in general, the letter should be marked up as an organization of headings and paragraphs, with the following exception.
Fetching data from the server - Learn web development
fetch and promises, on the other hand, are a more recent addition to the web platform, although they're supported well across the browser landscape, with the exception of internet explorer.
Introduction to the server side - Learn web development
they generally don't use the same programming languages (the exception being javascript, which can be used on the server- and client-side).
TypeScript support in Svelte - Learn web development
replace the content of the filterbutton.svelte file with the following: <!-- components/filterbutton.svelte --> <script lang='ts'> import { filter } from '../types/filter.enum' export let filter: filter = filter.all </script> <div class="filters btn-group stack-exception"> <button class="btn toggle-btn" class:btn__primary={filter === filter.all} aria-pressed={filter === filter.all} on:click={()=> filter = filter.all} > <span class="visually-hidden">show</span> <span>all</span> <span class="visually-hidden">tasks</span> </button> <button class="btn toggle-btn" class:btn__primary={filter === filter.active} aria-pressed={filter === filter.active} o...
Componentizing our Svelte app - Learn web development
add the following content into the file: <script> export let filter = 'all' </script> <div class="filters btn-group stack-exception"> <button class="btn toggle-btn" class:btn__primary={filter === 'all'} aria-pressed={filter === 'all'} on:click={()=> filter = 'all'} > <span class="visually-hidden">show</span> <span>all</span> <span class="visually-hidden">tasks</span> </button> <button class="btn toggle-btn" class:btn__primary={filter === 'active'} aria-pressed={filter === 'active'} on:click={()=> filter = 'a...
Dynamic behavior in Svelte: working with variables and props - Learn web development
update it like this: <div class="filters btn-group stack-exception"> <button class="btn toggle-btn" class:btn__primary={filter === 'all'} aria-pressed={filter === 'all'} on:click={()=> filter = 'all'} > <span class="visually-hidden">show</span> <span>all</span> <span class="visually-hidden">tasks</span> </button> <button class="btn toggle-btn" class:btn__primary={filter === 'active'} aria-pressed={filter === 'active'} on:click={()=> filter = 'a...
Getting started with Vue - Learn web development
public: this directory contains static assets that are published, but not processed by webpack during build (with one exception; index.html gets some processing).
Setting up your own test automation environment - Learn web development
you can retrieve network, command, exception, and selenium logs for every test within your test build.
Chrome Worker Modules
that is, the following will not show human-readable stacks: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.filename) log("stack: " + ex.stack); } rather, you should use properties modulename and modulestack, as follows: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.modulename) log("stack: " + ex.modulestack); } subtleties you shouldn’t mix both styles exports.foo = bar and module.exports = {foo: bar}.
Mozilla accessibility architecture
for example, nshtmltablecellframe::getaccessible() will eventually call nsiaccessibilityservice::createhtmltablecellaccessible(), which uses |new nshtmltablecellaccessible(domnode, weakpresshell); special exception: traversal overloading in some cases the necessary accessible children are not in the dom subtree for a node.
Creating Sandboxed HTTP Connections
k onchannelredirect: function (aoldchannel, anewchannel, aflags) { // if redirecting, store the new channel gchannel = anewchannel; }, // nsiinterfacerequestor getinterface: function (aiid) { try { return this.queryinterface(aiid); } catch (e) { throw components.results.ns_nointerface; } }, // nsiprogresseventsink (not implementing will cause annoying exceptions) onprogress : function (arequest, acontext, aprogress, aprogressmax) { }, onstatus : function (arequest, acontext, astatus, astatusarg) { }, // nsihttpeventsink (not implementing will cause annoying exceptions) onredirect : function (aoldchannel, anewchannel) { }, // we are faking an xpcom interface, so we need to implement qi queryinterface : function(aiid) { if (aiid.equals(c...
Eclipse CDT
when the indexing is done, open the log using "window > show view > other > general > error log" and check the summary and look for exceptions.
Interface Compatibility
one exception to this rule is apis which are explicitly shipped with mozilla prefixes as a technology preview.
Commenting IDL for better documentation
if the specified * quote number is invalid, an exception is thrown.
Reviewer Checklist
make sure the patch doesn't create any unused code (e.g., remove strings when removing a feature) all caught exceptions should be logged at the appropriate level, bearing in mind personally identifiable information, but also considering the expense of computing and recording log output.
Error codes returned by Mozilla APIs
rror_xpc_scriptable_ctor_failed (0x80570012) ns_error_xpc_cant_call_wo_scriptable (0x80570013) ns_error_xpc_cant_ctor_wo_scriptable (0x80570014) ns_error_xpc_ci_returned_failure (0x80570015) ns_error_xpc_gs_returned_failure (0x80570016) ns_error_xpc_bad_cid (0x80570017) ns_error_xpc_bad_iid (0x80570018) ns_error_xpc_cant_create_wn (0x80570019) ns_error_xpc_js_threw_exception (0x8057001a) ns_error_xpc_js_threw_native_object (0x8057001b) ns_error_xpc_js_threw_js_object (0x8057001c) ns_error_xpc_js_threw_null (0x8057001d) ns_error_xpc_js_threw_string (0x8057001e) ns_error_xpc_js_threw_number (0x8057001f) ns_error_xpc_javascript_error (0x80570020) ns_error_xpc_javascript_error_with_details (0x80570021) ns_error_xpc_cant_convert_primitive_t...
Limitations of frame scripts
the exceptions are: content-document-global-created document-element-inserted outer-window-destroyed inner-window-destroyed dom-window-destroyed these must be registered in the content process.
Communicating with frame scripts
the api is mostly symmetrical, with one major exception: frame scripts can send asynchronous or synchronous messages to chrome, but chrome can only send asynchronous messages to content.
Limitations of frame scripts
the exceptions are: content-document-global-created document-element-inserted outer-window-destroyed inner-window-destroyed dom-window-destroyed these must be registered in the content process.
Performance
under some circumstances it may even cause exceptions when attempting to register something twice under the same id.
Blocked: Custom cookie permission
the permission can be changed or removed by: going to preferences > content blocking > cookies and site data clicking on the manage permissions button and updating the listed exceptions ...
Blocked: All third-party storage access requests
the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the cookies checkbox if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element.
Blocked: Storage access requests from trackers
the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the tracker checkbox if the blocked resource doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element.
Security best practices for Firefox front-end engineers
the linter makes an exception for code that uses string literals that are hard coded in the source code, assuming benevolent developers.
CSS <display-xul> component
inline-grid obsolete since gecko 62 xul inline grid -moz-grid-group obsolete since gecko 62 xul grid group -moz-grid-line obsolete since gecko 62 xul grid line -moz-stack obsolete since gecko 62 xul stack -moz-inline-stack obsolete since gecko 62 xul inline stack -moz-deck obsolete since gecko 62 xul deck -moz-popup obsolete since gecko 62 xul popup all xul display values, with the exception of -moz-box and -moz-inline-box, have been removed in bug 1288572.
Implementing Download Resuming
the server is not using http 1.1), then accessing this attribute will throw an ns_error_not_resumable exception.
AsyncShutdown.jsm
for instance, at the end of phase profilebeforechange, no service is permitted to write to the profile directory (with the exception of telemetry).
DeferredTask.jsm
a common use case occurs when a data structure should be saved into a file every time the data changes, using asynchronous calls, and multiple changes to the data may happen within a short time: let savedeferredtask = new deferredtask(function* () { yield os.file.writeatomic(...); // any uncaught exception will be reported.
Downloads.jsm
when you catch an exception during a download, you can use this to verify if ex instanceof downloads.error, before reading the exception properties with the error details.
OS.File.Error
these exceptions hold both a human-readable error message detailing the i/o error and attributes to help determining the cause of the error.
PerfMeasurement.jsm
page_faults uint64 the number of page exceptions the os handled.
Deferred
although the reason can be undefined, it is generally an error object, like in exception handling.
Deferred
although the reason can be undefined, it is generally an error object, like in exception handling.
Sqlite.jsm
if an exception is thrown by the onrow handler, the exception is logged and processing of subsequent rows occurs as if nothing happened.
XPCOMUtils.jsm
exceptions thrown this method throws an exception with the message "in generateci, don't use a component for generating classinfo" if classinfo parameter is an xpcom component.
Encodings for localization files
there are a few exceptions, though.
Mozilla Content Localized in Your Language
gender are there exceptions to standard gender conventions within your language?
Localizing with Mozilla Translator
there will be some exceptions.
What every Mozilla translator should know
there is one exception to this process.
Writing localizable code
there are few exceptions to this rule, but in general, the localized file should comply with standards and should not require build tools to be transformed.
MathML3Testsuite
this exception also holds for obsolete features (such as macro, mode etc) or for other undefined behaviors (attribute href for example).
Mozilla Port Blocking
515 printer 526 tempo 530 courier 531 chat 532 netnews 540 uucp 556 remotefs 563 nntp+ssl 587 submission 601 syslog 636 ldap+ssl 993 imap+ssl 995 pop3+ssl 2049 nfs 4045 lockd 6000 x11 protocol specific exceptions each protocol handler can override the global blocked ports to allow it's own protocol to function.
Mozilla Web Developer FAQ
html-specific css exceptions do not apply.
Activity Monitor, Battery Status Menu and top
the exception is when the application is closed, in which case it disappears immediately.
JS::PerfMeasurement
::cache_misses .cache_misses memory accesses that missed the cache ::branch_instructions .branch_instructions branch instructions executed ::branch_misses .branch_misses branch instructions that were not predicted correctly ::bus_cycles .bus_cycles total memory bus cycles ::page_faults .page_faults total page-fault exceptions fielded by the os ::major_page_faults .major_page_faults page faults that required disk access ::context_switches .context_switches context switches involving the profiled thread ::cpu_migrations .cpu_migrations migrations of the profiled thread from one cpu core to another these events map directly to "generic events" in the linux 2.6.
Debugging out-of-memory problems
out-of-memory exceptions from js setting memory.dump_reports_on_oom in about:config to true will cause the browser to automatically write about:memory dumps to a temp file printed to the browser console (note: not web console) when an oom crash is encountered.
NSPR's Position On Abrupt Thread Termination
the problem with abrupt termination is that it can happen at any time, to a thread that is coded correctly to handle both normal and exceptional situations, but will be unable to do so since it will be denied the opportunity to complete execution.
Optimizing Applications For NSPR
the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which nspr has overridden to make sure they are aware of the nspr local threads.
Monitors
monitor type with the exception of pr_newmonitor, which creates a new monitor object, all monitor functions require a pointer to an opaque object of type prmonitor.
JSS Provider Notes
the verification is transparent to the application (unless it fails and throws an exception).
Mozilla-JSS JCA Provider notes
the verification is transparent to the application (unless it fails and throws an exception).
NSS 3.12.6 release notes
bug 527759: add multiple roots to nss (single patch) bug 528741: pkix_hash throws a null-argument exception on empty strings bug 530907: the peerid argument to ssl_setsockpeerid should be declared const bug 531188: decompression failure with https://livechat.merlin.pl/ bug 532417: build problem with spaces in path names bug 534943: clean up the makefiles in lib/ckfw/builtins bug 534945: lib/dev does not need to include headers from lib/ckfw bug 5356...
NSS 3.19.2.1 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
NSS 3.19.4 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
NSS 3.20.1 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
NSS 3.28.3 release notes
a program linked with most older nss 3.x shared libraries (excluding the exceptions mentioned above), will work with nss 3.28.3 shared libraries without recompiling or relinking.
NSS 3.29.1 release notes
a program linked with most older nss 3.x shared libraries (excluding the exceptions mentioned above), will work with nss 3.29.1 shared libraries without recompiling or relinking.
NSS Developer Tutorial
the function prototype of an exported function, cannot be changed, with these exceptions: a foo * parameter can be changed to const foo *.
PKCS11 Implement
the only exception to this requirement involves key generation for a new certificate, during which an orphan key waits for a brief time for a matching certificate.
Multithreading in Necko
background threads are used to manage all i/o operations (with the exception of few cases).
Tutorial: Embedding Rhino
to make sure that it is called even if an exception is thrown, it is put into the finally block corresponding to the try block starting after context.enter().
Rhino FAQ
for example, creating an array of seven ints can be done with the code var intarray = java.lang.reflect.array.newinstance(java.lang.integer.type, 7); when i try to execute a script i get the exception required security context missing.
Creating JavaScript tests
if they're not, throw an exception (which will cause the test to fail).
GC Rooting Guide
the only exception to this is if they are added as roots with the js::persistentrooted class, but don't do this unless it's really necessary.
SpiderMonkey Internals: Thread Safety
exception handling, for example, is per-jscontext.
Self-hosted builtins in SpiderMonkey
debugging self-hosted code self-hosted code by default is hidden from client javascript code; in particular, self-hosted frames will be filtered out of the stack traces of exceptions.
JS::CreateError
type jsexntype the exception's type.
JS::OrdinaryToPrimitive
on error or exception, it returns false, and the value left in *vp is undefined.
JS::SetOutOfMemoryCallback
added in spidermonkey 38 description unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
JS::ToInt32
on error or exception, it returns false, and the value left in *out is undefined.
JS::ToInt64
on error or exception, it returns false, and the value left in *out is undefined.
JS::ToNumber
on error or exception, it returns false, and the value left in *out is undefined.
JS::ToPrimitive
on error or exception, it returns false, and the value left in *vp is undefined.
JS::ToString
on error or exception, it returns nullptr.
JS::ToUint16
on error or exception, it returns false, and the value left in *out is undefined.
JS::ToUint32
on error or exception, it returns false, and the value left in *out is undefined.
JS::ToUint64
on error or exception, it returns false, and the value left in *out is undefined.
JS::Value
the only exception is that only a single nan value can be represented.
JSBool
js_true indicates success; js_false indicates an error or exception occurred.
JSCheckAccessOp
description check whether obj[id] may be accessed per mode, returning js_false on error/exception, js_true on success with obj[id]'s stored value in *vp.
JSDeletePropertyOp
this callback may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false.
JSExnType
this article covers features introduced in spidermonkey 17 possible exception types.
JSExtendedClass.wrappedObject
if so, it fails with an exception.
JSFastNative
on error or exception, it must return js_false.
JSHasInstanceOp
return false on error or exception, true on success with true in *bp if v is an instance of obj, false in *bp otherwise.
JSID_VOID
a void jsid is not a valid id and only arises as an exceptional api return value, such as in js_nextproperty.
JSIteratorOp
the callback should return an iterator object or null if an error or exception occurred on cx.
JSObjectOp
jsobjectop is the type of several jsapi callbacks that map an object to another object, or null if an error or exception occurred.
JSObjectOps.defaultValue
the jsclass.convert callback should convert obj to the given type, returning js_true with the resulting value in *vp on success, and returning js_false on error or exception.
JSObjectOps.getAttributes
returns js_false on error or exception, else js_true with current attributes in *attrsp.
JSObjectOps.getProperty
description get, set, or delete obj[id], returning js_false on error or exception, js_true on success.
JSObjectOps.lookupProperty
description look for id in obj and its prototype chain, returning js_false on error or exception, js_true on success.
JSObjectPrincipalsFinder
therefore null does not mean an error was reported; in no event should an error be reported or an exception be thrown by this callback's implementation.
JSPropertyOp
each of these callbacks may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false.
JSRuntime
exception handling, error reporting, and some language options are per-jscontext.
JSTraceOp
the only exception for this rule is the case when the embedding needs a tight integration with gc.
JS_AlreadyHasOwnProperty
if the search fails with an error or exception, this returns false.
JS_CheckAccess
on error or exception, including if access is denied, js_checkaccess returns js_false, and the values left in *vp and *attrsp are undefined.
JS_CompileFunction
on error or exception, they return null.
JS_CompileFunctionForPrincipals
on error or exception, they return null.
JS_CompileScriptForPrincipals
on error or exception, they return null.
JS_ConvertValue
on error or exception, it returns false, and the value left in *vp is undefined.
JS_DefaultValue
on error or exception, it returns false, and the value left in *vp is undefined.
JS_DefineFunction
on error or exception, they return null.
JS_DefineFunctions
on error or exception, it stops defining functions and returns false.
JS_DefineObject
on error or exception (if the object cannot be created, the property already exists, or the property cannot be created), js_defineobject returns null.
JS_DeleteProperty
these functions return true on success, regardless of whether a property was actually deleted, and false on error or exception.
JS_DeleteProperty2
on error or exception, the return value is false, and the value left in *succeeded is unspecified.
JS_Enumerate
on error or exception, js_enumerate returns null.
JS_ForwardGetPropertyTo
on an error or exception, these functions return false, and the value left in *vp is undefined.
JS_GetElement
if the search fails with an error or exception, js_getelement returns false, and the value left in *vp is undefined.
JS_GetProperty
on an error or exception, these functions return false, and the value left in *vp is undefined.
JS_GetPropertyDefault
on an error or exception, these functions return false, and the value left in *vp is undefined.
JS_GetPrototype
if js_getprototype returns false, that signals an exception, which should be handled as usual.
JS_HasArrayLength
this function may return js_false without having reported any error or exception.
JS_HasElement
if the search fails with an error or exception, js_haselement returns false, and the value left in *foundp is undefined.
JS_HasInstance
on error or exception, it returns false, and the value left in *bp is undefined.
JS_IsStopIteration
this article covers features introduced in spidermonkey 31 determine whether the value is a stopiteration exception or not.
JS_LookupElement
on error or exception, js_lookupelement returns false, and the value left in *vp is undefined.
JS_LookupProperty
on error or exception (such as running out of memory during the search), the return value is false, and the value left in *vp is undefined.
JS_NewObjectForConstructor
if the constructor does not have a prototype property, this function will return null and set an exception on cx.
JS_NewUCString
on error or exception, they return null.
JS_PushArguments
on error or exception, js_pusharguments returns null.
JS_SetErrorReporter
like all other spidermonkey callbacks, the error reporter callback must not throw a c++ exception.
JS_SetParent
otherwise, it reports an error or sets an exception and returns js_false.
JS_SetProperty
on error or exception, it returns false, and the value left in v is unspecified.
JS_ValueToBoolean
on error or exception, it returns js_false, and the value left in *bp is undefined.
JS_ValueToECMAInt32
on error or exception, it returns js_false, and the value left in *ip is undefined.
JS_ValueToFunction
if conversion fails with an error or exception, js_valuetofunction returns null.
JS_ValueToInt32
on error or exception, it returns js_false, and the value left in *ip is undefined.
jsid
a void jsid is not a valid id and only arises as an exceptional api return value, such as in js_nextproperty.
JSDBGAPI
js_getscriptlineextent js_getscriptversion js_gettopscriptfilenameflags js_getscriptfilenameflags js_flagscriptfilenameprefix jsfilename_null jsfilename_system jsfilename_protected evaluating debug code js_evaluateinstackframe examining object properties typedef jspropertydesc jspd_enumerate jspd_readonly jspd_permanent jspd_alias jspd_argument jspd_variable jspd_exception jspd_error typedef jspropertydescarray js_propertyiterator js_getpropertydesc js_getpropertydescarray js_putpropertydescarray hooks js_setdebuggerhandler js_setsourcehandler js_setexecutehook js_setcallhook js_setobjecthook js_setthrowhook js_setdebugerrorhook js_setnewscripthook js_setdestroyscripthook js_getglobaldebughooks js_setcontextdebughooks memory usage ...
SpiderMonkey 1.8.5
strings js_comparestrings received a new function signature with bug 609440, allowing us to correctly propagate exceptions when the underlying functions to retrieve the characters in the string failed.
SpiderMonkey 1.8.7
strings js_comparestrings received a new function signature with bug 609440, allowing us to correctly propagate exceptions when the underlying functions to retrieve the characters in the string failed.
SpiderMonkey 17
the one exception to this is js_maybegc which still takes a context as argument.
SpiderMonkey 24
the one exception to this is js_maybegc which still takes a context as argument.
SpiderMonkey 45
e (bug 1165486) js_checkforinterrupt (bug 1058695) js::mapdelete (bug 1159469) js::mapforeach (bug 1159469) js::newsetobject (bug 1159469) js::setsize (bug 1159469) js::sethas (bug 1159469) js::setdelete (bug 1159469) js::setadd (bug 1159469) js::setclear (bug 1159469) js::setkeys (bug 1159469) js::setvalues (bug 1159469) js::setentries (bug 1159469) js::setforeach (bug 1159469) js::exceptionstackornull (bug 814497) js::copyasyncstack (bug 1160307) js::getsavedframesource (bug 1216819) js::getsavedframeline (bug 1216819) js::getsavedframecolumn (bug 1216819) js::getsavedframefunctiondisplayname (bug 1216819) js::getsavedframeasynccause (bug 1216819) js::getsavedframeasyncparent (bug 1216819) js::getsavedframeparent (bug 1216819) js::buildstackstring (bug 1133191) js::flushpe...
The Publicity Stream API
missing required properties) finally, the publicizeactivity() function will throw an exception if required arguments are missing, or if unsupported arguments are present.
extIPreferenceBranch
note: this function has not been implemented and will raise an exception.
Creating a Python XPCOM component
note: there are exceptions; see this discussion for information on the use of string and wstring for unicode transfer.
XPCOM changes in Gecko 2.0
miscellaneous xpcnativewrapper changes using the delete operator on "expando" properties of an xpcnativewrapper no longer throws a security exception.
Starting WebLock
but in practice, manually declaring class methods in xpcom is the exception and not the rule.
Using XPCOM Components
note: private-xpcom-interfaces there are exceptions to this.
Mozilla internal string guide
the same as astring with a few odd xpconnect exceptions: when the special javascript value null is passed to a domstring parameter of an xpcom method, it becomes a void domstring.
Components.ID
the exception to this is the case where a component is written in javascript and needs to register itself with the component manager using its own nsid - an id that is not already registered and thus does not appear in components.classes.
Components.isSuccessCode
components.issuccesscode() is functionally equivalent to the following javascript: function issuccesscode(returncode) { return (returncode & 0x80000000) === 0; } since failure error codes are turned into exceptions when encountered in javascript, this function usually is not necessary.
Components.returnCode
if the javascript code needs to signal failure then that is done by throwing an exception.
Components.utils.Sandbox
the exception is "-promise": the promise constructor is available by default for sandboxes, and you use this option to remove it from the sandbox.
Components.utils.evalInSandbox
any exceptions raised by the evaluated code will show as originating from the above url.
Components.utils.getWeakReference
note: in gecko 11.0, this method was changed to throw an exception if obj is null.
Components object
the components object has the following members: classes array of classes by contractid classesbyid array of classes by cid constructor constructor for constructor of components exception constructor for xpconnect exceptions id constructor for xpcom nsids interfaces array of interfaces by interface name interfacesbyid array of interfaces by iid issuccesscode function to determine if a given result code is a success code lastresult result code of most recent xpconnect call manager the global xpcom component manager results ...
HOWTO
e.g., you use: components.utils.import("resource://app/modules/gloda/log4moz.js"); however, you get (for that particular line, which is the first import): uncaught exception: [exception...
NS_InitXPCOM2
the one exception is that you may call ns_newlocalfile or ns_newnativelocalfile to create a nsifile needed for the abindirectory parameter to ns_initxpcom2.
NS_InitXPCOM3
the one exception is that you may call ns_newlocalfile or ns_newnativelocalfile to create a nsifile needed for the abindirectory parameter to ns_initxpcom3.
imgICache
exceptions thrown ns_ok if a uri was removed from the cache.
mozIAsyncHistory
exceptions thrown ns_error_invalid_arg passing in null for aplaceinfo.
mozISpellCheckingEngine
note: setting this value to a value that doesn't match an existing dictionary throws a ns_error_file_not_found exception.
mozIStorageStatementWrapper
throws an exception if no row is currently available.
Children
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
DoAction
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
ExtendSelection
void extendselection(); exceptions thrown ns_error_not_implemented always.
FirstChild
attribute nsiaccessible firstchild; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GetAccessibleRelated
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.ns_error_not_implemented indicates that the given relation type is unsupported see also nsiaccessible.getrelations() nsiaccessible.relationscount nsiaccessible.getrelation() ...
GetActionDescription
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GetActionName
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.ns_error_invalid_arg indicates that the given index is our of range.
GetChildAt
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GetKeyBindings
exceptions thrown ns_error_invalid_arg the given index doesn't correspond to default action (not zero).
GetRelation
exception thrown ns_error_invalid_arg indicates that the given index is invalid.
GetState
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
LastChild
attribute nsiaccessible lastchild; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
NextSibling
attribute nsiaccessible nextsibling; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
Parent
attribute nsiaccessible parent; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
PreviousSibling
attribute nsiaccessible previoussibling; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
SetSelected
void setselected( in boolean aisselected ); parameters aisselected[out] the current selection exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
TakeSelection
void takeselection(); exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
nsIAccessibleRelation
exceptions thrown ns_error_invalid_arg indicates the given index is out of range.
nsIAccessibleText
return value exceptions thrown missing exception gettextbeforeoffset() string methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars.
nsIAlertsService
exceptions thrown ns_error_not_available unable to display the notification; this may happen, for example, on mac os x if growl is not installed.
nsIAuthInformation
auth prompts should ignore flags they do not understand; especially, they should not throw an exception because of an unsupported flag.
nsIAuthPromptCallback
note: any exceptions thrown from this method should be ignored.
nsIAuthPromptProvider
exceptions thrown ns_error_not_available if no prompt is allowed or available for the given reason.
nsICachingChannel
exceptions thrown ns_error_not_available when there is not offline cache token.
nsIClassInfo
violates the xpcom interface guidelines exceptions thrown ns_error_not_available if the class does not have a classid contractid string a contractid through which an instance of this class can be created, or null.
nsICommandLineRunner
exceptions thrown ns_error_abort thrown when the handler aborts.
nsICompositionStringSynthesizer
if appendclause() and/or setcaret() are not called properly, e.g., sum of alength of calls of appendclause() is not same as composition string set by setstring(), this throws an exception.
nsIConsoleService
at the time of writing, possible values are: nsiscripterror.errorflag = 0 nsiscripterror.warningflag = 1 nsiscripterror.exceptionflag = 2 and nsiscripterror.strictflag = 4.
nsIConverterInputStream
a value of 0x0000 will cause an exception to be thrown if unknown byte sequences are encountered in the stream.
nsICookieManager
if the cookie cannot be found, no exception is thrown.
nsICookieManager2
'.foo.com', not '.com'), otherwise an exception will be thrown.
nsIDNSService
exceptions thrown ns_error_unknown_host if host could not be resolved.
nsIDOMChromeWindow
void beginwindowmove( in nsidomevent mousedownevent ); parameters mousedownevent exceptions thrown ns_error_not_implemented if the operating system does not support this method.
nsIDOMFile
see also nsidomfilelist nsidomfileexception datatransfer drag and drop ...
nsIDOMFileReader
examples os.file for the main thread - example - save canvas to disk see also file api specification working draft nsidomfile nsidomfilelist nsidomfileexception ...
nsIDOMGeoGeolocation
starting in gecko 1.9.2, you can access this service using: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsidomgeogeolocation); note: if nsidgeogeolocation throws an exception when importing, try using this: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsisupports); method overview void clearwatch(in unsigned short watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback er...
nsIDOMHTMLAudioElement
exceptions thrown ns_error_dom_invalid_state_err the stream has not been initialized for writing by a call to mozsetup().
nsIDOMOfflineResourceList
note: versioned application caches are not yet supported; this method will throw an exception.
nsIDOMStorage
exceptions thrown index_size_err there is no key at the specified index.
nsIDOMStorage2
exceptions thrown index_size_errthere is no key at the specified index.
nsIDOMXPathEvaluator
see also introduction to using xpath in javascript document.evaluate dom level 3 xpath specification xml path language (xpath)rec nsidomxpathresult nsidomxpathexception ...
nsIDOMXPathResult
see also introduction to using xpath in javascript document object model (dom) level 3 xpath specification nsidomxpathevaluator document.evaluate nsidomxpathexception ...
nsIDirectoryEnumerator
exceptions thrown ns_ok if the call succeeded and the directory was closed.
nsIDownloadManagerUI
exceptions thrown ns_error_unexpected the user interface isn't currently open.
nsIDownloadProgressListener
an exception will be thrown if one of them is missing.
nsIDragService
the only exception is getcurrentsession(), since there's currently no way to check for a drag in progress using standard dom methods or properties.
nsIEventTarget
exceptions thrown ns_error_unexpected indicates that the thread is shutting down and has finished processing events, so this event would never run and has not been dispatched.
nsIFactory
exceptions thrown ns_error_no_interface indicates that the requested interface is not supported.
nsIFilePicker
exceptions thrown ns_error_failure if you try to read this attribute.
nsIFileProtocolHandler
exceptions thrown ns_error_not_available the os does not support such files.
nsIFrameLoader
exceptions thrown throws an exception with non-remote frames.
nsIFrameLoaderOwner
exceptions thrown ns_error_dom_security_err if the swap is not allowed on security grounds.
nsIHTMLEditor
the exception is a link, which is more like a text attribute: the anchor tag is returned if the selection is within the textnode(s) that are children of the "a" node.
nsIHttpHeaderVisitor
this method can throw an exception to terminate enumeration of the channel's headers.
nsIInterfaceRequestor
exceptions thrown ns_error_no_interface the requested interface is not available.
nsIJSON
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) note: this interface may only be used from javascript code, with the exception of the legacydecodetojsval() method.
nsILoadGroup
by the time this call ends, arequest will have been removed from the loadgroup, even if this function throws an exception.
nsILoginManager
exceptions thrown an exception is thrown if the login information is already stored in the login manager.
nsIMimeHeaders
methods extractheader() string extractheader( [const] in string headername, in boolean getallofthem ); parameters headername missing description getallofthem missing description return value missing description exceptions thrown missing exception missing description initialize() void initialize( [const] in string allheaders, in long allheaderssize ); parameters allheaders insert the complete message content allheaderssize length of the passed in content exceptions thrown missing exception missing description remarks see also ...
nsIModule
exceptions thrown ns_error_factory_not_registered indicates that the requested class is not available.
nsIMsgAccount
exceptions thrown ns_error_already_opened if it is called more then once removeidentity() removes an identity from this account.
nsIMsgDatabase
exceptions thrown ns_error_file_target_does_not_exist afoldername doesn't exist and acreate was false.
nsIMsgMessageService
if streaming over the network is required and this is true, then an exception is thrown.
nsIMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type!
nsIMsgWindow
notificationcallbacks nsiinterfacerequestor these are currently used to set notification callbacks on protocol channels to handle things like bad cert exceptions.
nsIPrivateBrowsingService
changing this value while handling one of the notifications generated by the private browsing service throws an ns_error_failure exception.
nsIProfile
exceptions thrown ns_error_failure a profile already exists with the name newname.
nsIProfileLock
exceptions thrown ns_error_unexpected the profile isn't locked.
nsIProperties
exceptions thrown ns_error_failure if the property does not exist.
nsIPropertyBag
exceptions thrown ns_error_failure if a property with that name doesn't exist.
nsIResumableChannel
exceptions thrown ns_error_not_resumable if this load is not resumable.
nsISearchEngine
if null, will default to "text/html" exceptions thrown ns_error_invalid_arg if name or value are null.
nsISelectionController
exceptions thrown missing exception missing description selectall() will select the whole page.
nsISessionStartup
defer_session 3 the previous session is viable but shouldn't be restored without explicit action (with the exception of app tabs, which are always restored in this case).
nsISocketProvider
parameters are the same as newsocket() with the exception of afiledesc, which is an input parameter instead.
nsIStackFrame
xpcom/base/nsiexception.idlscriptable please add a summary to this article.
nsIStreamListener
note: throwing an exception will cancel the request.
nsIStringEnumerator
throws an exception if there are no more strings.
nsISupports
exceptions thrown ns_error_no_interface the requested interface is not available.
nsISupportsPriority
in some cases, changing the priority of an object may be disallowed (resulting in an exception being thrown) or may simply be ignored.
nsITaskbarPreview
if any step of that process fails, an exception is thrown.
nsITaskbarProgress
exceptions thrown ns_error_illegal_value if currentvalue is greater than maxvalue.
nsIToolkitProfile
note: the unlocker object cannot be returned to javascript as the error causes an exception to be thrown.
nsIURIFixup
exceptions thrown ns_error_unknown_protocol when we can not get a protocol handler service for the uri scheme.
nsIUTF8StringEnumerator
throws an exception if there are no more strings.
nsIWeakReference
exceptions thrown ns_error_null_pointer the referent no longer exists.
nsIWritablePropertyBag
exceptions thrown ns_error_failure if a property with that name doesn't exist.
nsIXFormsModelElement
exceptions thrown domexception if there is no matching instance data.
nsIXmlRpcClient
via nsixpconnect::getpendingexception()->data a nsixmlrpcfault object can be retreieved with more information on the fault.
nsIMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type!
XPIDL Syntax
MozillaTechXPIDLSyntax
the following is a list of potential features which are parseable but may not result in expected code: struct, union, and enumerated types array declarators (appears to be supported in xpidl_header.c but not xpidl_typelib.c) exception declarations module declarations variable arguments (that makes the abnf get more wonky) sequence types max-length strings fixed-point numbers "any" and "long double" types.
Xray vision
xray semantics for object and array the exceptions are object and array: their interesting state is in javascript, not c++.
Address Book examples
let card = collection.cardforemailaddress("foo@bar.invalid.com"); note: both of these functions may raise an ns_error_not_implemented exception if the collection has not implemented that function.
Mail composition back end
i will try to make comments for these exceptions.
Mailnews and Mail code review requirements
unit test rules patches are required to include automated tests which are run during make check or via mozmill in thunderbird, but submitters are encouraged to request exceptions from reviewers in cases where the cost is believed to outweigh the benefit.
Using JS in Mozilla code
however, there are a few exceptions, listed here.
Library
exceptions thrown ctypes ctype functiontype abi typeerror the return type was specified as an array.
Flash Activation: Browser Comparison - Plugins
le chrome microsoft edge setting name ask to activate html5 by default click-to-run 'application/x-shockwave-flash' in navigator.mimetypes by default when flash is inactive yes no no 'application/x-shockwave-flash' in navigator.mimetypes when user enables flash yes yes yes <object> with fallback content triggers ui yes, with exceptions no yes small/hidden flash triggers additional ui yes no no enabling flash automatically reloads the page no yes yes other features related to flash domain blocking plugin power saver peripheral content pause each of the browser vendors has a roadmap about the future of flash and changes to the user experience.
Initialization and Destruction - Plugins
no plug-in api calls can take place in either direction until the initialization completes successfully, with the exception of the functions np_initialize and np_shutdown, which are not in the function tables.
Scripting plugins - Plugins
entifier npn_identifierisstring npn_utf8fromidentifier npn_intfromidentifier npobject npn_construct (since firefox 3.0b1) npn_createobject npn_retainobject npn_releaseobject npn_invoke npn_invokedefault npn_enumerate (since mozilla 1.9a1) npn_evaluate npn_getproperty npn_setproperty npn_removeproperty npn_hasproperty npn_hasmethod npn_setexception npclass « previousnext » ...
Gecko Plugin API Reference - Plugins
n_getstringidentifiers npn_getintidentifier npn_identifierisstring npn_utf8fromidentifier npn_intfromidentifier npobject npn_createobject npn_retainobject npn_releaseobject npn_invoke npn_invokedefault npn_evaluate npn_getproperty npn_setproperty npn_removeproperty npn_hasproperty npn_hasmethod npn_setexception npclass structures npanycallbackstruct npbyterange npembedprint npevent npfullprint npp np_port npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npwindow constants error codes result codes plug-in version constants version feature constants external resources external projects and articles for plugin crea...
DOM Inspector internals - Firefox Developer Tools
popupoverlay.xul this overlay defines most of the static structure of the menus in the menubar, with some exceptions.
Ignore a source - Firefox Developer Tools
when “pause on exceptions” is enabled in the debugger settings, the debugger won’t pause when an exception is thrown in the ignored source; instead it waits until (and if) the stack unwinds to a frame in a source that isn’t ignored.
How to - Firefox Developer Tools
access debugging in add-onsbreaking on exceptionsdebug eval sourcesdisable breakpointsexamine, modify, and watch variableshighlight and inspect dom nodesignore a sourceopen the debuggerpretty-print a minified filesearchset a breakpointset a conditional breakpointset watch expressionsstep through codeuse a source mapuse watchpoints ...
Debugger.Memory - Firefox Developer Tools
the owning debugger’s uncaughtexceptionhandler is still fired for errors thrown in debugger.memory hooks.
Debugger-API - Firefox Developer Tools
errors throw proper javascript exceptions.
The Firefox JavaScript Debugger - Firefox Developer Tools
there are multiple ways to tell the debugger how and when to pause: set a breakpoint set a conditional breakpoint set an xhr breakpoint set event listener breakpoints break on exceptions use watchpoints for property reads and writes break on dom mutation disable breakpoints control execution what can you do after execution pauses?
Migrating from Firebug - Firefox Developer Tools
while there are no breakpoints for single javascript errors, there is a setting pause on exceptions within the debugger panel options.
Network request details - Firefox Developer Tools
(there may be some exceptions, such as x-firefox-spdy, which is added by firefox.) you can copy some or all of the response header in json format by using the context menu: if you select copy, a single key word, value pair is copied.
Console messages - Firefox Developer Tools
the web console supports the following console api messages: assert() clear() count() dir() dirxml() error() exception() group() groupend() info() log() table() time() timeend() trace() warn() the console prints a stack trace for all error messages, like this: function foo() { console.error("it explodes"); } function bar() { foo(); } function dostuff() { bar(); } dostuff(); server server-side log messages was introduced in firefox 43, but removed in firefox 56.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown.
AbortController - Web APIs
}).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with a domexception named aborterror.
AbortSignal - Web APIs
current version of firefox rejects the promise with a domexception you can find a full working example on github — see abort-api (see it running live also).
AesGcmParams - Web APIs
if additionaldata is given here then the same data must be given in the corresponding call to decrypt(): if the data given to the decrypt() call does not match the original data, the decryption will throw an exception.
AnalyserNode.fftSize - Web APIs
note: if its value is not a power of 2, or it is outside the specified range, a domexception with the name indexsizeerror is thrown.
AnalyserNode.maxDecibels - Web APIs
note: if a value less than or equal to analysernode.mindecibels is set, an indexsizeerror exception is thrown.
AnalyserNode.minDecibels - Web APIs
note: if a value greater than analysernode.maxdecibels is set, an index_size_err exception is thrown.
AnalyserNode.smoothingTimeConstant - Web APIs
note: if a value outside the range 0–1 is set, an index_size_err exception is thrown.
Animation.cancel() - Web APIs
WebAPIAnimationcancel
exceptions this method doesn't directly throw exceptions; however, if the animation's playstate is anything but "idle" when cancelled, the current finished promise is rejected with a domexception named aborterror.
Animation.pause() - Web APIs
WebAPIAnimationpause
exceptions invalidstateerror the animation's currenttime is unresolved (for example, if it's never been played or isn't currently playing) and the end time of the animation is positive infinity.
AudioBuffer() - Web APIs
exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as numberofchannels being higher than supported, or a samplerate outside the nominal range).
AudioBuffer.copyFromChannel() - Web APIs
exceptions indexsizeerror one of the input parameters has a value that is outside the accepted range: the value of channelnumber specifies a channel number which doesn't exist (that is, it's greater than or equal to the value of numberofchannels on the channel).
AudioBuffer.getChannelData() - Web APIs
if the channel index value is greater than of equal to audiobuffer.numberofchannels, an index_size_err exception will be thrown.
AudioBufferSourceNode.start() - Web APIs
exceptions typeerror a negative value was specified for one or more of the three time parameters.
AudioContext.close() - Web APIs
this method throws an invalid_state_err exception if called on an offlineaudiocontext.
AudioContext.resume() - Web APIs
this method will cause an invalid_state_err exception to be thrown if called on an offlineaudiocontext.
AudioContext.suspend() - Web APIs
this method will cause an invalid_state_err exception to be thrown if called on an offlineaudiocontext.
AudioDestinationNode - Web APIs
the number of channels in the input must be between 0 and the maxchannelcount value or an exception is raised.
AudioScheduledSourceNode.start() - Web APIs
if no value is passed then the duration will be equal to the length of the audio buffer minus the offset value return value undefined exceptions invalidstatenode the node has already been started.
AudioScheduledSourceNode.stop() - Web APIs
return value undefined exceptions invalidstatenode the node has not been started by calling start().
AudioWorkletGlobalScope.registerProcessor - Web APIs
return value undefined exceptions notsupportederror the name is an empty string, or a constructor under the given name is already registered.
AudioWorkletNode() - Web APIs
exceptions notsupportederror the specified options.outputchannelcount is 0 or larger than the current implementation supports.
AudioWorkletProcessor.process - Web APIs
exceptions as the process() method is implemented by the user, it can throw anything.
BaseAudioContext.createBuffer() - Web APIs
exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as numberofchannels being higher than supported, or a samplerate outside the nominal range).
BaseAudioContext.createIIRFilter() - Web APIs
exceptions invalidstateerror all of the feedforward coefficients are 0, and/or the first feedback coefficient is 0.
BiquadFilterNode.getFrequencyResponse() - Web APIs
return value undefined exceptions invalidaccesserror the three arrays provided are not all of the same length.
Bluetooth.getAvailability() - Web APIs
exceptions this method doesn't throw any exceptions.
Bluetooth.getDevices() - Web APIs
exceptions this method doesn't throw any exceptions.
Bluetooth.requestDevice() - Web APIs
exceptions typeerror the provided options do not makes sense.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
exceptions none.
CSS.registerProperty() - Web APIs
exceptions invalidmodificationerror the given name has already been registered.
CSSKeyframesRule - Web APIs
if it contains more than one keyframe rule, a domexception with a syntax_err is thrown.
CSSNumericValue.add() - Web APIs
return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.div() - Web APIs
exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.equals() - Web APIs
exceptions none.
CSSNumericValue.max() - Web APIs
exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.min() - Web APIs
exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.mul() - Web APIs
return value a cssmathproduct exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.parse() - Web APIs
exceptions syntaxerror tbd examples the following returns a cssunitvalue object with a unit property equal to "px" and a value property equal to 42.
CSSNumericValue.sub() - Web APIs
return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.sum() - Web APIs
syntax var cssmathsum = cssnumericvalue.sub(number); parameters number either a number or a cssmathsum return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.to() - Web APIs
exceptions syntaxerror indicates that an invalid type was passed to the method.
CSSNumericValue.toSum() - Web APIs
exceptions syntaxerror undefined typeerror indicates that an invalid type was passed to the method.
CSSNumericValue.type - Web APIs
exceptions none.
CSSStyleDeclaration.item() - Web APIs
this method doesn't throw exceptions as long as you provide arguments; the empty string is returned if the index is out of range and a typeerror is thrown if no argument is provided.
CSSStyleDeclaration.removeProperty() - Web APIs
exceptions domexception no_modification_allowed_err: if the property or declaration block is read only.
CSSStyleDeclaration.setProperty() - Web APIs
the following values are accepted: string value "important" keyword undefined string empty value "" return value undefined exceptions domexception (nomodificationallowederror): if the property or declaration block is read only.
CSSStyleSheet.addRule() - Web APIs
note that due to somewhat estoteric rules about where you can legally insert rules, it's possible that an exception may be thrown.
CSSStyleSheet.insertRule() - Web APIs
violating them will likely raise a domexception.
Using the CSS Painting API - Web APIs
the 2d rendering context is a subset of the html5 canvas api; the version available to houdini (called the paintrenderingcontext2d) is a further subset containing most of the features available in the full canvas api with the exception of the canvasimagedata, canvasuserinterface, canvastext, and canvastextdrawingstyles apis.
Cache.add() - Web APIs
WebAPICacheadd
exceptions exception happens when typeerror the url scheme is not http or https.
Cache.addAll() - Web APIs
WebAPICacheaddAll
exceptions exception happens when typeerror the url scheme is not http or https.
Cache.match() - Web APIs
WebAPICachematch
a catch() clause is triggered when the call to fetch() throws an exception.
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
caches.has('v1').then(function(hascache) { if (!hascache) { somecachesetupfunction(); } else { caches.open('v1').then(function(cache) { return cache.addall(myassets); }); } }).catch(function() { // handle exception here.
CanvasRenderingContext2D.drawImage() - Web APIs
exceptions thrown index_size_err if the canvas or source rectangle width or height is zero.
CanvasRenderingContext2D.getImageData() - Web APIs
exceptions indexsizeerror thrown if either sw or sh are zero.
Transformations - Web APIs
the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] if any of the arguments are infinity the transformation matrix must be marked as infinite instead of the method throwing an exception.
Using images - Web APIs
if you try to call drawimage() before the image has finished loading, it won't do anything (or, in older browsers, may even throw an exception).
ChannelMergerNode() - Web APIs
exceptions invalidstateerror an option such as channelcount or channelcountmode has been given an invalid value.
ChildNode.after() - Web APIs
WebAPIChildNodeafter
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ChildNode.before() - Web APIs
WebAPIChildNodebefore
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ChildNode.replaceWith() - Web APIs
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ClipboardItem.getType() - Web APIs
exceptions domexception the type does not match a known mime type.
Console.error() - Web APIs
WebAPIConsoleerror
syntax console.error(obj1 [, obj2, ..., objn]); console.error(msg [, subst1, ..., substn]); console.exception(obj1 [, obj2, ..., objn]); console.exception(msg [, subst1, ..., substn]); note: console.exception() is an alias for console.error(); they are functionally identical.
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
return if no label parameter included: default: 1042ms if an existing label is included: timer name: 1242ms exceptions if there is no running timer, timelog() returns the warning: timer “default” doesn’t exist.
console - Web APIs
WebAPIConsole
console.exception() an alias for error().
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
return value returns a promise that resolves with undefined exceptions typeerror if the service worker's registration is not present or the service worker does not contain a fetchevent.
ContentIndex.delete() - Web APIs
return value returns a promise that resolves with undefined exceptions no exceptions are thrown.
ContentIndex.getAll() - Web APIs
exceptions no exceptions are thrown.
ConvolverNode() - Web APIs
exceptions exception explanation notsupportederror the referenced audiobuffer does not have the correct number of channels, or it has a different sample rate to the associated audiocontext.
ConvolverNode.buffer - Web APIs
this audiobuffer must have the same sample-rate as the audiocontext or an exception will be thrown.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
exceptions none.
CredentialsContainer.get() - Web APIs
an aborted operation may complete normally (generally if the abort was received after the operation finished) or reject with an "aborterror" domexception.
CredentialsContainer - Web APIs
in exceptional circumstances, the promise may reject.
CryptoKey - Web APIs
WebAPICryptoKey
exportkey() or wrapkey() will throw an exception if used to extract this key.
CustomElementRegistry.define() - Web APIs
exceptions exception description notsupportederror the customelementregistry already contains an entry with the same name or the same constructor (or is otherwise already defined), or extends is specified and it is a valid custom element name, or extends is specified but the element it is trying to extend is an unknown element.
CustomElementRegistry.whenDefined() - Web APIs
exceptions exception description syntaxerror if the provided name is not a valid custom element name, the promise rejects with a syntaxerror.
DOMParser - Web APIs
WebAPIDOMParser
xmldocument image/svg+xml xmldocument examples parsing xml once you have created a parser object, you can parse xml from a string using the parsefromstring() method: let parser = new domparser() let doc = parser.parsefromstring(stringcontainingxmlsource, "application/xml") error handling note that if the parsing process fails, the domparser does not throw an exception, but instead returns an error document: <parsererror xmlns="http://www.mozilla.org/newlayout/xml/parsererror.xml"> (error description) <sourcetext>(a snippet of the source xml)</sourcetext> </parsererror> the parsing errors are also reported to the error console, with the document uri (see below) as the source of the error.
DataTransferItemList.add() - Web APIs
exceptions notsupportederror a string data parameter was provided, and the list already contains an item whose kind is "plain unicode string" and whose type is equal to the specified type parameter.
DataTransferItemList.clear() - Web APIs
no exception is thrown.
DataTransferItemList.remove() - Web APIs
exceptions invalidstateerror the drag data store is not in read/write mode, so the item can't be removed.
DisplayMediaStreamConstraints.video - Web APIs
since a video track must always be included, a value of false results in a typeerror exception being thrown.
Document.createAttribute() - Web APIs
exceptions invalid_character_err if the parameter contains invalid characters for xml attribute.
Document.createCDATASection() - Web APIs
will throw a ns_error_dom_invalid_character_err exception if one tries to submit the closing cdata sequence ("]]>") as part of the data, so unescaped user-provided data cannot be safely used without with this method getting this exception (createtextnode() can often be used in its place).
Document.createProcessingInstruction() - Web APIs
exceptions dom_invalid_character throws if either of the following are true: the processing instruction target is invalid — it should be a valid xml name that doesn't contain "xml", "xml", or any case combination of the two, other than standardized ones such as <?xml-stylesheet ?>.
Document.domain - Web APIs
WebAPIDocumentdomain
exceptions securityerror an attempt has been made to set domain under one of the following conditions: the document is inside a sandboxed <iframe> the document has no browsing context the document's effective domain is null the given value is not equal to the document's effective domain (or it is not a registerable domain suffix of it) the document-domain feature-policy is enabled examples getting the doma...
Document.execCommand() - Web APIs
formatblock adds an html block-level element around the line containing the current selection, replacing the block element containing the line if one exists (in firefox, <blockquote> is the exception — it will wrap any containing block element).
Document.requestStorageAccess() - Web APIs
the threshold is enforced on the level of etld+1, so for example two storage access grants for foo.example.com and bar.example.com will only count as a single exception against the limit.
DocumentFragment.querySelector() - Web APIs
if the selectors specified in parameter are invalid a domexception with a syntax_err value is raised.
DocumentFragment.querySelectorAll() - Web APIs
if the selectors specified in parameter are invalid a domexception with a syntax_err value is raised.
EffectTiming.duration - Web APIs
exceptions typeerror the specified value is either a string other than "auto", a number less than zero, nan, or some other type of object entirely.
EffectTiming.iterations - Web APIs
exceptions typeerror an attempt was made to set the value of this property to a negative number or nan.
Element.attachShadow() - Web APIs
exceptions exception explanation invalidstateerror the element you are trying to attach to is already a shadow host.
Element.classList - Web APIs
WebAPIElementclassList
string.prototype.trim polyfill if (!"".trim) string.prototype.trim = function(){ return this.replace(/^[\s]+|[\s]+$/g, ''); }; (function(window){"use strict"; // prevent global namespace pollution if(!window.domexception) (domexception = function(reason){this.message = reason}).prototype = new error; var wsre = /[\11\12\14\15\40]/, wsindex = 0, checkifvalidclasslistentry = function(o, v) { if (v === "") throw new domexception( "failed to execute '" + o + "' on 'domtokenlist': the token provided must not be empty." ); if((wsindex=v.search(wsre))!==-1) throw new domexception("failed to execute '"+o+"' on 'd...
Element.closest() - Web APIs
WebAPIElementclosest
exceptions syntaxerror is thrown if the selectors is not a valid selector list string.
Element.getAttributeNS() - Web APIs
obsolete specifies that a not_supported_err exception is thrown if the ua does not support the "xml" feature.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
exceptions syntaxerror an attempt was made to set the value of innerhtml using a string which is not properly-formed html.
Element.insertAdjacentElement() - Web APIs
exceptions exception explanation syntaxerror the position specified is not a recognised value.
Element.insertAdjacentText() - Web APIs
exceptions exception explanation syntaxerror the position specified is not a recognised value.
Element.matches() - Web APIs
WebAPIElementmatches
exceptions syntax_err the specified selector string is invalid.
Element.releasePointerCapture() - Web APIs
exceptions exception explanation invalidpointerid pointerid does not match any of the active pointers.
Element.setAttribute() - Web APIs
exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names.
Element.setPointerCapture() - Web APIs
exceptions exception explanation invalidpointerid pointerid does not match any of the active pointers.
Element.toggleAttribute() - Web APIs
exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names.
ExtendableEvent - Web APIs
the promise resolves when all resources have been fetched and cached, or else when any exception occurs.
FetchEvent.respondWith() - Web APIs
exceptions exception notes networkerror a network error is triggered on certain combinations of fetchevent.request.mode and response.type values, as hinted at in the "global rules" listed above.
FileError - Web APIs
WebAPIFileError
best practices most people don't read the page on errors and exceptions unless they're stumped.
FileReader.abort() - Web APIs
WebAPIFileReaderabort
syntax instanceoffilereader.abort(); exceptions dom_file_abort_err thrown when abort is called while no read operation is in progress (that is, the state isn't loading).
FileReader.error - Web APIs
WebAPIFileReadererror
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
FileReader - Web APIs
properties filereader.error read only a domexception representing the error that occurred while reading the file.
FileReaderSync.readAsArrayBuffer() - Web APIs
exceptions the following exceptions can be raised by this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
FileReaderSync.readAsBinaryString() - Web APIs
exceptions the following exceptions can be raised by this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
FileReaderSync.readAsDataURL() - Web APIs
exceptions the following exceptions can be raised by this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
FileReaderSync.readAsText() - Web APIs
exceptions the following exceptions can be raised by this method: notfounderror is raised when the resource represented by the dom file or blob cannot be found, e.g.
File and Directory Entries API - Web APIs
fileexception represents an error which is generated by synchronous file system calls.
FontFace.load - Web APIs
WebAPIFontFaceload
exceptions networkerror indicates that the attempt to load the font failed.
GlobalEventHandlers.onerror - Web APIs
error events are fired at various targets for different kinds of errors: when a javascript runtime error (including syntax errors and exceptions thrown within handlers) occurs, an error event using interface errorevent is fired at window and window.onerror() is invoked (as well as handlers attached by window.addeventlistener (not only capturing)).
HTMLCanvasElement.captureStream() - Web APIs
exceptions notsupportederror the value of framerate is negative.
HTMLCanvasElement.toBlob() - Web APIs
exceptions securityerror the canvas's bitmap is not origin clean; at least some of its contents come from secure examples getting a file representing the canvas once you have drawn content into a canvas, you can convert it into a file of any supported image format.
HTMLCanvasElement.toDataURL() - Web APIs
exceptions securityerror the canvas's bitmap is not origin clean; at least some of its contents have or may have been loaded from a site other than the one from which the document itself was loaded.
HTMLDialogElement.showModal() - Web APIs
exceptions if the dialog is already open (i.e.
HTMLFormElement.elements - Web APIs
the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLFormElement.length - Web APIs
the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLFormElement.requestSubmit() - Web APIs
exceptions typeerror the specified submitter is not a submit button.
HTMLFormElement - Web APIs
elements that are considered form controls the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLImageElement.decode() - Web APIs
exceptions encodingerror a domexception indicating that an error occurred while decoding the image.
HTMLInputElement.setSelectionRange() - Web APIs
chrome, starting from version 33, throws an exception while accessing those properties and method on the rest of input types.
HTMLInputElement.stepUp() - Web APIs
if the form control is non time, date, or numeric in nature, and therefore does not support the step attribute (see the list of supported input types in the the table above), or if the step value is set to any, an invalidstateerror exception is thrown.
HTMLMediaElement.defaultPlaybackRate - Web APIs
the value 0.0 is invalid and throws a not_supported_err exception.
HTMLMediaElement.load() - Web APIs
pending play promises are aborted with an "aborterror" domexception.
HTMLMediaElement.pause() - Web APIs
exceptions none.
HTMLMediaElement.readyState - Web APIs
seeking will no longer raise an exception.
HTMLMediaElement.setSinkId() - Web APIs
exceptions exception explanation domexception no permission to use the requested device examples const devices = await navigator.mediadevices.enumeratedevices(); const audiodevices = devices.filter(device => device.kind === 'audiooutput'); const audio = document.createelement('audio'); await audio.setsinkid(audiodevices[0].deviceid); console.log('audio is being played on ' ...
HTMLObjectElement.checkValidity - Web APIs
return value true exceptions none.
HTMLObjectElement.setCustomValidity - Web APIs
return value undefined exceptions none.
HTMLOptionsCollection - Web APIs
mozilla allows this, while other implementations could potentially throw a domexception.
HTMLTableElement.deleteRow() - Web APIs
return value no return value errors thrown if the number of the row to delete, specified by the parameter, is greater or equal to the number of available rows, or if it is negative and not equal to the special index -1, representing the last row of the table, the exception index_size_err is thrown.
HTMLTableElement.insertRow() - Web APIs
if index is greater than the number of rows, an indexsizeerror exception will result.
HTMLTableRowElement.insertCell() - Web APIs
if index is greater than the number of cells, an indexsizeerror exception will result.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
for instance, when using promises to create microtasks, exceptions thrown by the callback are reported as rejected promises rather than being reported as standard exceptions.
History.replaceState() - Web APIs
the new url must be of the same origin as the current url; otherwise replacestate throws an exception.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor.continue() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor.continuePrimaryKey() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
this function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor - Web APIs
WebAPIIDBCursor
this function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
methods that create transactions throw an exception if a closing operation is pending.
IDBDatabase.createObjectStore() - Web APIs
exceptions this method may raise a domexception with a domerror of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction callback.
IDBDatabase.deleteObjectStore() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction callback.
databases - Web APIs
exceptions this method may raise a domexception of the following types: attribute description securityerror the method is called from an opaque origin.
IDBFactory.deleteDatabase() - Web APIs
note that attempting to delete a database that doesn't exist does not throw an exception, in contrast to idbdatabase.deleteobjectstore(), which does throw an exception if the named object store does not exist.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
exceptions this method may raise a domexception of the following types: exception description typeerror the value of version is zero or a negative number or not a number.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
exceptions there are a several exceptions which can occur when you attempt to change an index's name.
IDBIndex.openCursor() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.openKeyCursor() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
exceptions this method may raise a domexception of the following type: exception description dataerror the following conditions raise an exception: the lower or upper parameters were not passed a valid key.
IDBKeyRange.includes() - Web APIs
exceptions this method may raise a domexception of the following type: attribute description dataerror the supplied key was not a valid key.
IDBKeyRange.lowerBound() - Web APIs
exceptions this method may raise a domexception of the following type: exception description dataerror the value parameter passed was not a valid key.
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
exceptions this method may raise a domexception of the following types: exception description dataerror the value parameter passed was not a valid key.
IDBKeyRange.upperBound() - Web APIs
exceptions this method may raise a domexception of the following type: exception description dataerror the value parameter passed was not a valid key.
IDBLocaleAwareKeyRange - Web APIs
this is because when you use bound(), it checks if lower bound < upper bound, and throws an exception if that’s not the case.
IDBObjectStore.add() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBObjectStore.clear() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBObjectStore.count() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror this idbobjectstore has been deleted.
IDBObjectStore.createIndex() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description constrainterror occurs if an index with the same name already exists in the database.
IDBObjectStore.delete() - Web APIs
exceptions this method may raise a domexception of the following types: exception description transactioninactiveerror this object store's transaction is inactive.
IDBObjectStore.deleteIndex() - Web APIs
return value undefined exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction mode callback.
IDBObjectStore.get() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbobjectstore's transaction is inactive.
IDBObjectStore.getKey() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbobjectstore's transaction is inactive.
IDBObjectStore.index() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror the source object store has been deleted, or the transaction for the object store has finished.
IDBObjectStore.name - Web APIs
exceptions there are a several exceptions which can occur when you attempt to change an object store's name.
IDBObjectStore.openCursor() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror this idbobjectstore or idbindex has been deleted.
IDBObjectStore.openKeyCursor() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror this idbobjectstore or idbindex has been deleted.
IDBObjectStore.put() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
if the request failed and the result is not available, an invalidstateerror exception is thrown.
IDBTransaction.abort() - Web APIs
syntax transaction.abort(); exceptions this method may raise a domexception of the following type: exception description invalidstateerror the transaction has already been committed or aborted.
IDBTransaction: abort event - Web APIs
bubbles yes cancelable no interface event event handler property onabort this can happen for any of the following reasons: bad requests, (for example, trying to add the same key twice, or put the same index key when the key has a uniqueness constraint), an explicit abort() call an uncaught exception in the request's success/error handler, an i/o error (an actual failure to write to disk, for example disk detached, or other os/hardware failure) quota exceeded.
IDBTransaction.objectStore() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description notfounderror the requested object store is not in this transaction's scope.
IIRFilterNode.getFrequencyResponse() - Web APIs
return value undefined exceptions notsupportederror the three arrays provided are not all of the same length.
Basic concepts - Web APIs
transactions have a well-defined lifetime, so attempting to use a transaction after it has completed throws exceptions.
Using IndexedDB - Web APIs
// first, make sure you created index in request.onupgradeneeded: // objectstore.createindex("name", "name"); // otherwize you will get domexception.
IndexedDB API - Web APIs
idbdatabaseexception represents exception conditions that can be encountered while performing database operations.
InstallEvent - Web APIs
the promise resolves when all resources have been fetched and cached, or when any exception occurs.
IntersectionObserver.IntersectionObserver() - Web APIs
exceptions syntaxerror the specified rootmargin is invalid.
IntersectionObserver.unobserve() - Web APIs
if the specified element isn't being observed, this method does nothing and no exception is thrown.
IntersectionObserverEntry.intersectionRect - Web APIs
this rectangle is computed by taking the intersection of boundingclientrect with each of the target's ancestors' clip rectangles, with the exception of the intersection root itself.
Location: reload() - Web APIs
WebAPILocationreload
the reload may be blocked and a security_error domexception thrown.
MediaCapabilities.decodingInfo() - Web APIs
return value a promise fulfilling with a mediacapabilitiesinfo interface containing three boolean attributes: supported smooth powerefficient exceptions a typeerror is raised if the mediaconfiguration passed to the decodinginfo() method is invalid, either because the type is not video or audio, the contenttype is not a valid codec mime type, the media decoding configuration is not a valid value for the media decoding type, or any other error in the media configuration passed to the method, including omitting values required in the media decodin...
MediaCapabilities.encodingInfo() - Web APIs
return value a promise fulfilling with a mediacapabilitiesinfo interface containing three boolean attributes: supported smooth powerefficient exceptions a typeerror is raised if the mediaconfiguration passed to the encodinginfo() method is invalid, either because the type is not video or audio, the contenttype is not a valid codec mime type, or any other error in the media configuration passed to the method, including omitting any of the media encoding configuration elements.
MediaDevices.getUserMedia() - Web APIs
exceptions rejections of the returned promise are made by passing a domexception error object to the promise's failure handler.
MediaKeyStatusMap.entries() - Web APIs
returns exceptions specifications specification status comment encrypted media extensions recommendation initial definition.
MediaRecorder() - Web APIs
exceptions notsupportederror the specified mime type is not supported by the user agent.
MediaRecorder.pause() - Web APIs
exceptions invalidstateerror the mediarecorder is currently "inactive"; you can't pause recording if it's not active.
MediaRecorder - Web APIs
the received event is based on the mediarecordererrorevent interface, whose error property contains a domexception that describes the actual error that occurred.
MediaRecorderErrorEvent() - Web APIs
error a domexception that describes the error that occurred.
MediaSession.setPositionState() - Web APIs
exceptions typeerror this error can occur in an array of circumstances: the specified mediapositionstate object's duration is missing, negative, or null.
MediaSource.addSourceBuffer() - Web APIs
exceptions invalidaccesserror the value specified for mimetype is an empty string rather than a valid mime type.
MediaSource.endOfStream() - Web APIs
return value undefined exceptions exception explanation invalidstateerror mediasource.readystate is not equal to open, or one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e.
MediaSource.removeSourceBuffer() - Web APIs
return value undefined exceptions exception explanation notfounderror the supplied sourcebuffer doesn't exist in mediasource.sourcebuffers.
MediaStreamAudioSourceNode() - Web APIs
exceptions invalidstateerror the specified mediastream doesn't have any audio tracks.
MediaStreamAudioSourceNode - Web APIs
exceptions invalidstateerror the stream specified by the mediastream parameter does not contain any audio tracks.
MediaStreamTrackAudioSourceNode() - Web APIs
exceptions notsupportederror the specified context is not an audiocontext.
MediaStream Image Capture API - Web APIs
though a mediastream holds several types of tracks and provides multiple methods for retrieving them, the imagecapture constructor will throw a domexception of type notsupportederror if mediastreamtrack.kind is not "video".
MediaStream Recording API - Web APIs
its error property is a domexception that specifies that error occurred.
MediaTrackConstraints.deviceId - Web APIs
an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session.
MediaTrackSettings.deviceId - Web APIs
an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session.
MediaTrackSettings - Web APIs
properties of shared screen tracks tracks containing video shared from a user's screen (regardless of whether the screen data comes from the entire screen or a portion of a screen, like a window or tab) are generally treated like video tracks, with the exception that they also support the following added settings: cursor a domstring which indicates whether or not the mouse cursor is being included in the generated stream and under what conditions.
MerchantValidationEvent() - Web APIs
exceptions typeerror the string specified as validationurl could not be parsed as a url.
MerchantValidationEvent.complete() - Web APIs
exceptions this exception may be passed into the rejection handler for the promise: invalidstateerror the event did not come directly from the user agent, but was instead dispatched by other code.
Microdata DOM API - Web APIs
setting the value when the element has no itemprop attribute or when the element's value is an item throws an invalidaccesserror exception.
MutationObserver.observe() - Web APIs
exceptions typeerror thrown in any of the following circumstances: the options are configured such that nothing will actually be monitored.
MutationObserverInit - Web APIs
otherwise, a typeerror exception will be thrown.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: aborterror the scan operation was aborted with abortsignal passed in options.
NDEFRecord.toRecords() - Web APIs
exceptions notsupported the user agent does not know how to parse this combination of ndefrecord.data and ndefrecord.recordtype.
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: aborterror the write operation was aborted with abortsignal passed in options.
Navigator.canShare() - Web APIs
exceptions none.
Navigator.getUserMedia() - Web APIs
}; } errorcallback when the call fails, the function specified in the errorcallback is invokedwith a mediastreamerror object as its sole argument; this object is is modeled on domexception.
Navigator.mozIsLocallyAvailable() - Web APIs
note: security exceptions can occur if the requested uri is not from the same origin.
Navigator.registerProtocolHandler() - Web APIs
exceptions securityerror the user agent blocked the registration.
Navigator.requestMediaKeySystemAccess() - Web APIs
the fulfillment handler receives as input just one parameter: mediakeysystemaccess a mediakeysystemaccess object representing the media key system configuration described by keysystem and supportedconfigurations exceptions in case of an error, the returned promise is rejected with a domexception whose name indicates what kind of error occurred.
Node.baseURIObject - Web APIs
this property is read-only; attempting to write to it will throw an exception.
Node.nodePrincipal - Web APIs
notes this property is read-only; attempting to write to it will throw an exception.
NodeIterator.nextNode() - Web APIs
in old browsers, as specified in old versions of the specifications, the method may throws the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
NodeIterator.previousNode() - Web APIs
in old browsers, as specified in old versions of the specifications, the method may throws the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
NodeIterator - Web APIs
the methods previousnode() and nextnode() don't raise an exception any more.
NodeList.item() - Web APIs
WebAPINodeListitem
this method doesn't throw exceptions as long as you provide arguments.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer.
OfflineAudioContext.resume() - Web APIs
exceptions the promise is rejected when the following exception is encountered.
OfflineAudioContext.suspend() - Web APIs
exceptions the promise is rejected when any exception is encountered.
OscillatorNode.type - Web APIs
exceptions invalidstateerror the value custom was specified.
PaintWorklet.registerPaint - Web APIs
return value undefined exceptions typeerror thrown when one of the arguments is invalid or missing.
PannerNode.PannerNode() - Web APIs
exceptions rangeerror the refdistance, maxdistance, or rollofffactor properties have been given a value that is outside the accepted range.
PannerNode.coneOuterGain - Web APIs
exceptions invalidstateerror the property has been given a value outside the accepted range (0–1).
PannerNode.maxDistance - Web APIs
exceptions rangeerror the property has been given a value that is outside the accepted range.
PannerNode.refDistance - Web APIs
exceptions rangeerror the property has been given a value that is outside the accepted range.
PannerNode.rolloffFactor - Web APIs
exceptions rangeerror the property has been given a value that is outside the accepted range.
ParentNode.append() - Web APIs
WebAPIParentNodeappend
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ParentNode.prepend() - Web APIs
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ParentNode.replaceChildren() - Web APIs
exceptions hierarchyrequesterror: the constraints of the node tree are violated.
PaymentRequest.canMakePayment() - Web APIs
note: if you call this too often, the browser may reject the returned promise with a domexception.
PerformanceServerTiming.toJSON - Web APIs
exceptions none.
Permissions.query() - Web APIs
WebAPIPermissionsquery
exceptions exception explanation typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g.
Permissions.revoke() - Web APIs
exceptions typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g.
Using the Permissions API - Web APIs
finally, click manage exceptions and remove the permissions you granted to the sites you are interested in.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
if the authenticator already contains one of such a public key credential, the client will throw a domexception or asks the user if they want to create a new credential.
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
if the authenticator does not contain any of these public key credentials, the client will throw a domexception "notallowederror".
RTCDTMFSender.insertDTMF() - Web APIs
return value undefined exceptions invalidstateerror the dtmf tones couldn't be sent because the track has been stopped, or is in a read-only or inactive state.
RTCDTMFSender.toneBuffer - Web APIs
all other characters are unrecognized and will cause insertdtmf() to throw an invalidcharactererror exception.
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
all other characters are unrecognized and will cause insertdtmf() to throw an invalidcharactererror exception.
RTCDataChannel: error event - Web APIs
{ console.error(" sent dlts failure alert: ", err.receivedalert); } break; } // add source file name and line information console.error(" error in file ", err.filename, " at line ", err.linenumber, ", column ", err.columnnumber); }, false); the received event provides details in an rtcerror object called error; rtcerror is an extension of the domexception interface.
RTCDataChannel.send() - Web APIs
exceptions invalidstateerror since the data channel uses a separate transport channel from the media content, it must establish its own connection; if it hasn't finished doing so (that is, its readystate is "connecting"), this error occurs without sending or buffering the data.
RTCErrorEvent.error - Web APIs
since rtcerror is based upon domexception, it includes those properties.
RTCIceCandidate.address - Web APIs
note: if port is null — and port is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.foundation - Web APIs
note: if port is null — and port is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.port - Web APIs
note: if port is null, passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.priority - Web APIs
note: if priority is null, passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.sdpMLineIndex - Web APIs
note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception.
RTCIceCandidate.sdpMid - Web APIs
note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception.
RTCIceCandidate.type - Web APIs
if type is null, that information was missing from the candidate's a-line, which will cause rtcpeerconnection.addicecandidate() to throw an operationerror exception.
RTCIceCandidateInit.sdpMLineIndex - Web APIs
note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception.
RTCIceCandidateInit.sdpMid - Web APIs
note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception.
RTCPeerConnection.addStream() - Web APIs
the exception is in chrome, where addstream() does make the peer connection sensitive to later stream changes (though such changes do not fire the negotiationneeded event).
RTCPeerConnection.addTrack() - Web APIs
exceptions invalidaccesserror the specified track (or all of its underlying streams) is already part of the rtcpeerconnection.
RTCPeerConnection.addTransceiver() - Web APIs
exceptions typeerror a string was specified as trackorkind which is not valid.
RTCPeerConnection.createDataChannel() - Web APIs
exceptions invalidstateerror the rtcpeerconnection is closed.
RTCPeerConnection.removeTrack() - Web APIs
exceptions invalidstateerror the connection is not open.
RTCPeerConnection.setConfiguration() - Web APIs
exceptions invalidaccesserror one or more of the urls specified in configuration.iceservers is a turn server, but complete login information is not provided (that is, either the rtciceserver.username or rtciceserver.credentials is missing).
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
therefore, specifying a value less than 1.0 is not permitted and will cause a rangeerror exception to be thrown by rtcpeerconnection.addtransceiver() or rtcrtpsender.setparameters().
RTCRtpSender.replaceTrack() - Web APIs
exceptions if the returned promise is rejected, one of the following exceptions is provided to the rejection handler: invalidmodificationerror replacing the rtcrtpsender's current track with the new one would require negotiation.
RTCRtpSender.setParameters() - Web APIs
exceptions if an error occurs, the returned promise is rejected with the appropriate exception from the list below.
RTCRtpSender.setStreams() - Web APIs
exceptions invalidstateerror the sender's connection is closed.
RTCRtpTransceiver.stop() - Web APIs
return value undefined exceptions invalidstateerror the rtcpeerconnection of which the transceiver is a member is closed.
Range.compareBoundaryPoints() - Web APIs
if the value of the parameter is invalid, a domexception with a notsupportederror code is thrown.
Range.setEnd() - Web APIs
WebAPIRangesetEnd
exceptions exceptions are thrown as domexception objects of the following types: invalidnodetypeerror the node specified by endnode is a doctype node; range endpoints cannot be located inside a doctype node.
Range.surroundContents() - Web APIs
an exception will be thrown, however, if the range splits a non-text node with only one of its boundary points.
Range - Web APIs
WebAPIRange
living standard do not use rangeexception anymore, use domexception instead.
ReadableByteStreamController.close() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream is not readable for some other reason.
ReadableByteStreamController.enqueue() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached.
ReadableByteStreamController.error() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream is not readable for some other reason.
ReadableStream.ReadableStream() - Web APIs
exceptions rangeerror the supplied type value is neither "bytes" nor undefined.
ReadableStream.cancel() - Web APIs
exceptions typeerror the stream you are trying to cancel is not a readablestream, or it is locked.
ReadableStream.getReader() - Web APIs
exceptions rangeerror the provided mode value is not "byob" or undefined.
ReadableStream.pipeThrough() - Web APIs
exceptions typeerror the writable and/or readable property of transformstream are undefined.
ReadableStream.pipeTo() - Web APIs
exceptions typeerror the writablestream and/or readablestream objects are not a writable stream/readable stream, or one or both of the streams are locked.
ReadableStream.tee() - Web APIs
exceptions typeerror the source stream is not a readablestream.
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
exceptions typeerror the supplied stream parameter is not a readablestream, or it is already locked for reading by another reader, or its stream controller is not a readablebytestreamcontroller.
ReadableStreamBYOBReader.cancel() - Web APIs
exceptions typeerror the source object is not a readablestreambyobreader, or the stream has no owner.
ReadableStreamBYOBReader.read() - Web APIs
exceptions typeerror the source object is not a readablestreambyobreader, the stream has no owner, the view is not an object or has become detached, or the view's length is 0.
ReadableStreamBYOBReader.releaseLock() - Web APIs
exceptions typeerror the source object is not a readablestreambyobreader, or a read request is pending.
ReadableStreamBYOBRequest.respond() - Web APIs
exceptions typeerror the source object is not a readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is detached.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
exceptions typeerror the source object is not a readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is non-existant or detached.
ReadableStreamDefaultController.close() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultcontroller.
ReadableStreamDefaultController.enqueue() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultcontroller.
ReadableStreamDefaultController.error() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultcontroller, or the stream is not readable for some other reason.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
exceptions typeerror the supplied stream parameter is not a readablestream, or it is already locked for reading by another reader.
ReadableStreamDefaultReader.cancel() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultreader, or the stream has no owner.
ReadableStreamDefaultReader.read() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultreader, or the stream has no owner.
ReadableStreamDefaultReader.releaseLock() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultreader, or a read request is pending.
Request() - Web APIs
WebAPIRequestRequest
note the following behavioural updates to retain security while making the constructor less likely to throw exceptions: if this object exists on another origin to the constructor call, the request.referrer is stripped out.
ResizeObserver.disconnect() - Web APIs
exceptions none.
ResizeObserver.observe() - Web APIs
exceptions none.
ResizeObserver.unobserve() - Web APIs
exceptions none.
Response.redirect() - Web APIs
WebAPIResponseredirect
exceptions exception explanation rangeerror the specified status is not a redirect status.
SVGAnimatedString.baseVal - Web APIs
setter throws domexception.
SVGAnimatedString - Web APIs
setter throws domexception.
SVGImageElement.decode - Web APIs
exceptions none.
SVGRect - Web APIs
WebAPISVGRect
an svgrect object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
SVGScriptElement - Web APIs
a domexception is raised with the code no_modification_allowed_err on an attempt to change the value of a read only attribut.
Selection.setBaseAndExtent() - Web APIs
exceptions if anchoroffset is larger than the number of child nodes inside anchornode, or if focusoffset is larger than the number of child nodes inside focusnode, an indexsizeerror exception is thrown.
SensorErrorEvent - Web APIs
properties sensorerrorevent.error read only returns the domexception object passed in the event's contructor.
ServiceWorker - Web APIs
methods the serviceworker interface inherits methods from its parent, worker, with the exception of worker.terminate — this should not be accessible from service workers.
ServiceWorkerRegistration.showNotification() - Web APIs
if options’s silent is true and options’s vibrate is present a typeerror exception will be thrown.
SharedWorker() - Web APIs
exceptions a securityerror is raised if the document is not allowed to start workers, for example if the url has an invalid syntax or if the same-origin policy is violated.
SourceBuffer.abort() - Web APIs
exceptions exception explanation invalidstateerror the mediasource.readystate property of the parent media source is not equal to open, or this sourcebuffer has been removed from the mediasource.
SourceBuffer.appendBuffer() - Web APIs
exceptions none.
SourceBuffer.appendBufferAsync() - Web APIs
async function fillsourcebuffer(buffer, msbuffer) { try { while(true) { await msbuffer.appendbufferasync(buffer); } } catch(e) { handleexception(e); } } specifications not currently part of any specification.
SourceBuffer.appendStream() - Web APIs
exceptions none.
SourceBuffer.changeType() - Web APIs
exceptions typeerror the specified string is empty, rather than indicating a valid mime type.
SourceBuffer.remove() - Web APIs
exceptions exception explanation invalidaccesserror the mediasource.duration property is equal to nan, the start parameter is negative or greater than mediasource.duration, or the end parameter is less than or equal to start or equal to nan.
SourceBuffer.removeAsync() - Web APIs
async function emptysourcebuffer(msbuffer) { await msbuffer.removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification.
SourceBufferList: indexed property getter - Web APIs
exceptions no specific exceptions are thrown, but if the supplied index is great than or equal to sourcebufferlist.length, the operation will return undefined.
StaticRange.StaticRange() - Web APIs
exceptions invalidnodetypeerror a domexception fired if either or both of the startcontainer and/or endcontainer are a type of node which you can't include in a range.
SubtleCrypto.decrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
SubtleCrypto.deriveBits() - Web APIs
exceptions the promise is rejected when one of the following exceptions are encountered: invalidaccesserror raised when the base key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
SubtleCrypto.deriveKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions are encountered: invalidaccesserror raised when the master key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
SubtleCrypto.encrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
SubtleCrypto.exportKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when trying to export a non-extractable key.
SubtleCrypto.generateKey() - Web APIs
exceptions the promise is rejected when the following exception is encountered: syntaxerror raised when the result is a cryptokey of type secret or private but keyusages is empty.
SubtleCrypto.importKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the signing key is not a key for the request signing algorithm or when trying to use an algorithm that is either unknown or isn't suitable for signing.
SubtleCrypto.unwrapKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when the unwrapping key is not a key for the requested unwrap algorithm or if the cryptokey.usages value of that key doesn't contain unwrap.
SubtleCrypto.verify() - Web APIs
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the encryption key is not a key for the requested verifying algorithm or when trying to use an algorithm that is either unknown or isn't suitable for a verify operation.
SubtleCrypto.wrapKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when the wrapping key is not a key for the requested wrap algorithm.
Text.replaceWholeText() - Web APIs
a domexception with the value no_modification_err is thrown if one of the text nodes being replaced is read only.
Text.splitText() - Web APIs
WebAPITextsplitText
exceptions thrown a domexception with a value of index_size_err is thrown if the specified offset is negative or is greater than the number of 16-bit units in the node's text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only.
TextEncoder() - Web APIs
exceptions textencoder() throws no exceptions since firefox 48 and chrome 53 note: prior to firefox 48 and chrome 53 an exception would be thrown for an unknown encoding type.
TimeRanges.end() - Web APIs
WebAPITimeRangesend
exceptions index_size_err a domexception thrown if the specified index doesn't correspond to an existing range.
TimeRanges.start() - Web APIs
WebAPITimeRangesstart
exceptions index_size_err a domexception thrown if the specified index doesn't correspond to an existing range.
TouchEvent - Web APIs
the exception to this is chrome, starting with version 56 (desktop, chrome for android, and android webview), where the default value for the passive option for touchstart and touchmove is true and calls to preventdefault() will have no effect.
UserDataHandler - Web APIs
per the specification, exceptions should not be thrown in a userdatahandler.
Using the User Timing API - Web APIs
cleared all measures", 1); performance.clearmeasures(); } } interoperability as shown in the performance interface's browser compatibility table, the user timing methods are broadly implemented by desktop and mobile browsers (the only exceptions are no support for desktop safari and mobile safari).
User Timing API - Web APIs
interoperability as shown in the performance interface's browser compatibility table, the user timing methods are broadly implemented by desktop and mobile browsers (the only exceptions are desktop safari and mobile safari, however the safari technology preview 24 has support).
ValidityState - Web APIs
properties for each of these boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
exceptions notallowederror thrown when wake lock is not available, which can happen because: document is not allowed to use screen wake lock due to screen-wake-lock policy.
WakeLockSentinel.release() - Web APIs
return value returns a promise that resolves with undefined exceptions no exceptions are thrown.
WebGL2RenderingContext.drawBuffers() - Web APIs
exceptions if buffers contains not one of the accepted values, a gl.invalid_enum error is thrown.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown.
WebGL2RenderingContext.drawRangeElements() - Web APIs
exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown.
WebGL2RenderingContext.getBufferSubData() - Web APIs
exceptions an invalid_value error is generated if: offset + returneddata.bytelength would extend beyond the end of the buffer returneddata is null offset is less than zero.
WebGLRenderingContext.activeTexture() - Web APIs
exceptions if texture is not one of gl.texturei, where i is within the range from 0 to gl.max_combined_texture_image_units - 1, a gl.invalid_enum error is thrown.
WebGLRenderingContext.bindBuffer() - Web APIs
exceptions only one target can be bound to a given webglbuffer.
WebGLRenderingContext.bindFramebuffer() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, or gl.read_framebuffer.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.renderbuffer.
WebGLRenderingContext.bindTexture() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.texture_2d, gl.texture_cube_map, gl.texture_3d, or gl.texture_2d_array.
WebGLRenderingContext.blendEquation() - Web APIs
default value: gl.func_add exception if mode is not one of the three possible values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
exceptions if mode is not one of the three possible values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.blendFunc() - Web APIs
exceptions if sfactor or dfactor is not one of the listed possible values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
exceptions if srcrgb, dstrgb, srcalpha, or dstalpha is not one of the listed possible values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.bufferData() - Web APIs
exceptions a gl.out_of_memory error is thrown if the context is unable to create a data store with the given size.
WebGLRenderingContext.bufferSubData() - Web APIs
exceptions a gl.invalid_value error is thrown if the data would be written past the end of the buffer or if data is null.
WebGLRenderingContext.clear() - Web APIs
exceptions if mask is not one of the listed possible values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.drawArrays() - Web APIs
exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.drawElements() - Web APIs
exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, or gl.read_framebuffer.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer.
WebGLRenderingContext.getActiveUniform() - Web APIs
exceptions gl.invalid_value is generated if the program webglprogram is invalid (not linked, deleted, etc.).
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, gl.read_framebuffer or if attachment is not one of the accepted attachment points.
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
exceptions gl.invalid_enum if the shader or precision types aren't recognized.
WebGLRenderingContext.makeXRCompatible() - Web APIs
exceptions this method doesn't throw traditional exceptions; instead, the promise rejects with one of the following errors as the value passed into the rejection handler: aborterror switching the context over to the webxr-compatible context failed.
WebGLRenderingContext.readPixels() - Web APIs
exceptions a gl.invalid_enum error is thrown if format or type is not an accepted value.
WebGLRenderingContext.scissor() - Web APIs
exceptions if either width or height is a negative value, a gl.invalid_value error is thrown.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
exceptions a gl.invalid_value error is thrown if offset is negative.
A basic 2D WebGL animation example - Web APIs
since we're drawing a solid, untextured object with no lighting applied, this is exceptionally simple: <script id="fragment-shader" type="x-shader/x-fragment"> #ifdef gl_es precision highp float; #endif uniform vec4 uglobalcolor; void main() { gl_fragcolor = uglobalcolor; } </script> this starts by specifying the precision of the float type, as required.
Lifetime of a WebRTC session - Web APIs
this is a process by which the network connection is renegotiated, exactly the same way the initial ice negotiation is performed, with one exception: media continues to flow across the original network connection until the new one is up and running.
WebSocket() - Web APIs
exceptions thrown security_err the port to which the connection is being attempted is being blocked.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
exceptions thrown invalid_access_err an invalid code was specified.
WebSocket.send() - Web APIs
WebAPIWebSocketsend
exceptions thrown invalid_state_err the connection is not currently open.
Writing WebSocket servers - Web APIs
browsers generally require a secure connection for websockets, although they may offer an exception for local devices.
Geometry and reference spaces in WebXR - Web APIs
the only real exception is that you are likely to use the viewer reference space when performing the xr scene inline within web content.
WebXR permissions and security - Web APIs
otherwise, an appropriate exception is thrown, such as securityerror if the document doesn't have permission to enter immersive mode.
Starting up and shutting down a WebXR session - Web APIs
so a more complete function that starts up and returns a webxr session could look like this: async function createimmersivesession(xr) { try { session = await xr.requestsession("immersive-vr"); return session; } catch(error) { throw error; } } this function returns the new xrsession or throws an exception if an error occurs while creating the session.
Keyframe Formats - Web APIs
two exceptional css properties are: float, which must be written as cssfloat since "float" is a reserved word in javascript.
Using the Web Animations API - Web APIs
if your keyframe list has only one entry, element.animate() may throw a notsupportederror exception in some browsers until they are updated.
Window.fullScreen - Web APIs
WebAPIWindowfullScreen
bear in mind that if you try to set this property without chrome privileges, it will not throw an exception and instead just silently fail.
Window.localStorage - Web APIs
exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example).
Window.open() - Web APIs
WebAPIWindowopen
i always get an error in the javascript console saying "error: uncaught exception: permission denied to get property <property_name or method_name>.
window.postMessage() - Web APIs
as with any asynchronously-dispatched script (timeouts, user-generated events), it is not possible for the caller of postmessage to detect when an event handler listening for events sent by postmessage throws an exception.
Window.sessionStorage - Web APIs
exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example).
WindowOrWorkerGlobalScope.atob() - Web APIs
exceptions domexception (name: invalidcharactererror) throws if encodeddata is not valid base64.
WindowOrWorkerGlobalScope.btoa() - Web APIs
exceptions invalidcharactererror the string contained a character that did not fit in a single byte.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
ction() { if (typeof this.timeoutid === 'number') { this.cancel(); } this.timeoutid = window.settimeout(function(msg) { this.remind(msg); }.bind(this), 1000, 'wake up!'); }, cancel: function() { window.cleartimeout(this.timeoutid); } }; window.onclick = function() { alarm.setup(); }; notes passing an invalid id to cleartimeout() silently does nothing; no exception is thrown.
WindowOrWorkerGlobalScope.fetch() - Web APIs
exceptions aborterror the request was aborted due to a call to the abortcontroller method abort() method.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
if (typeof window.queuemicrotask !== "function") { window.queuemicrotask = function (callback) { promise.resolve() .then(callback) .catch(e => settimeout(() => { throw e; })); // report exceptions }; } specifications specification status comment html living standardthe definition of 'self.queuemicrotask()' in that specification.
Worker() - Web APIs
WebAPIWorkerWorker
exceptions a securityerror is raised if the document is not allowed to start workers, e.g.
WorkerGlobalScope.importScripts() - Web APIs
exceptions networkerror imported scripts were not served with a valid javascript mime type (i.e.
WorkerGlobalScope - Web APIs
this change was made to stop close() being available on service workers, as it isn't supposed to be used there and always throws an exception when called (see bug 1336043).
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
exceptions if addmodule() fails, it rejects the promise, delivering one of the following errors to the rejection handler.
WritableStream.abort() - Web APIs
exceptions typeerror the stream you are trying to abort is not a writablestream, or it is locked.
WritableStream.getWriter() - Web APIs
exceptions typeerror the stream you are trying to create a writer for is not a writablestream.
WritableStreamDefaultController.error() - Web APIs
exceptions typeerror the stream you are trying to error is not a writablestream.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
exceptions typeerror the provided stream value is not a writablestream, or it is locked to another writer already.
WritableStreamDefaultWriter.abort() - Web APIs
exceptions typeerror the stream you are trying to abort is not a writablestream, or it is locked.
WritableStreamDefaultWriter.close() - Web APIs
exceptions typeerror the stream you are trying to close is not a writablestream.
WritableStreamDefaultWriter.desiredSize - Web APIs
exceptions typeerror the writer’s lock is released.
WritableStreamDefaultWriter.write() - Web APIs
exceptions typeerror the target stream is not a writable stream, or it does not have an owner.
Using XMLHttpRequest - Web APIs
otherwise, an invalid_access_err exception is thrown.
XMLHttpRequest.open() - Web APIs
this must be true if the multipart attribute is true, or an exception will be thrown.
XMLHttpRequest.response - Web APIs
the value is null if the request is not yet complete or was unsuccessful, with the exception that when reading text data using a responsetype of "text" or the empty string (""), the response can contain the response so far while the request is still in the loading readystate (3).
XMLHttpRequest.responseText - Web APIs
exceptions invalidstateerror the xmlhttprequest.responsetype is not set to either the empty string or "text".
XMLHttpRequest.responseType - Web APIs
exceptions invalidaccesserror an attempt was made to change the value of responsetype on anxmlhttprequest which is in synchronous mode but not in a worker.
XMLHttpRequest.responseXML - Web APIs
exceptions invalidstateerror the responsetype isn't either "document" or an empty string.
XMLHttpRequest.send() - Web APIs
exceptions exception description invalidstateerror send() has already been invoked for the request, and/or the request is complete.
XMLHttpRequest.setRequestHeader() - Web APIs
note: for your custom fields, you may encounter a "not allowed by access-control-allow-headers in preflight response" exception when you send requests across domains.
XMLHttpRequest.timeout - Web APIs
timeout shouldn't be used for synchronous xmlhttprequests requests used in a document environment or it will throw an invalidaccesserror exception.
XPathResult.booleanValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not boolean_type, an xpathexception of type type_err is thrown.
XPathResult.numberValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not number_type, an xpathexception of type type_err is thrown.
XPathResult.singleNodeValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not any_unordered_node_type or first_ordered_node_type, an xpathexception of type type_err is thrown.
XPathResult.snapshotItem() - Web APIs
exceptions type_err in case xpathresult.resulttype is not unordered_node_snapshot_type or ordered_node_snapshot_type, an xpathexception of type type_err is thrown.
XPathResult.snapshotLength - Web APIs
exceptions type_err in case xpathresult.resulttype is not unordered_node_snapshot_type or ordered_node_snapshot_type, an xpathexception of type type_err is thrown.
XPathResult.stringValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not string_type, an xpathexception of type type_err is thrown.
XRFrame.getViewerPose() - Web APIs
exceptions invalidstateerror a domexception indicating that getviewerpose() was not called within the context of a callback to a session's xrsession.requestanimationframe().
XRReferenceSpace - Web APIs
all reference spaces—with the sole exception being bounded reference spaces—are described using the xrreferencespace type.
XRRigidTransform() - Web APIs
exceptions typeerror the value of the w coordinate in the specified position is not 1.0.
XRSession.requestReferenceSpace() - Web APIs
exceptions rather than throwing true exceptions, requestreferencespace() rejects the returned promise with a domexception whose name is found in the list below: notsupportederror the requested reference space is not supported.
XRSpace - Web APIs
WebAPIXRSpace
there are exceptions to this static nature; most commonly, an xrreferencespace may move in order to adjust based on reconfiguration of the user's headset or other motion-sensitive device.
XRSystem: requestSession() - Web APIs
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: invalidstateerror the requested session mode is immersive-vr but there is already an immersive vr session either currently active or in the process of being set up.
XRWebGLLayer() - Web APIs
exceptions invalidstateerror the new xrwebgllayer could not be created due to one of a number of possible state errors: the xrsession specified by session has already been stopped.
XRWebGLLayer.getViewport() - Web APIs
exceptions invalidstateerror either the specified view is not in an active xrframe or that xrframe and the xrwebgllayer are not part of the same webxr session.
msGetRegionContent - Web APIs
if an element is not a region, this method throws a domexception with the invalidaccesserror error code.
ARIA: timer role - Accessibility
the one exception is if focus xxx.
ARIA: application role - Accessibility
the one exception is if focus is set to a standard widget inside the application that supports keyboard navigation from the browser, for example an input element.
Keyboard-navigable JavaScript widgets - Accessibility
in exceptional circumstances, authors may want to redefine the order.
Keyboard - Accessibility
note: one important exception to this rule is if the element has role="document" applied to it, inside an interactive context (such as role="application").
Perceivable - Accessibility
1.4.9 images of text (no exception) (aaa) text should not be presented as part of an image unless it is purely decoration (i.e., it does not convey any content) or cannot be presented in any other way.
::cue-region - CSS: Cascading Style Sheets
the only exception is that background and its shorthand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media.
::cue - CSS: Cascading Style Sheets
WebCSS::cue
the only exception is that background and its longhand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media.
light-level - CSS: Cascading Style Sheets
washed the device is used in an exceptionally bright environment, causing the screen to be washed out and difficult to read.
Box alignment in grid layout - CSS: Cascading Style Sheets
the exception to this rule is where the item has an intrinsic aspect ratio, for example an image.
<basic-shape> - CSS: Cascading Style Sheets
description computed values of basic shapes the values in a <basic-shape> function are computed as specified, with these exceptions: omitted values are included and compute to their defaults.
drop-shadow() - CSS: Cascading Style Sheets
syntax drop-shadow(offset-x offset-y blur-radius color) the drop-shadow() function accepts a parameter of type <shadow> (defined in the box-shadow property), with the exception that the inset keyword and spread parameters are not allowed.
filter - CSS: Cascading Style Sheets
WebCSSfilter
the function accepts a parameter of type <shadow> (defined in css3 backgrounds), with the exception that the inset keyword is not allowed.
float - CSS: Cascading Style Sheets
WebCSSfloat
this was an exception to the rule, that the name of the dom member is the camel-case name of the dash-separated css name (due to the fact that "float" is a reserved word in javascript, as seen in the need to escape "class" as "classname" and escape <label>'s "for" as "htmlfor").
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
the only exception is that the unit has been changed to rem.
image-orientation - CSS: Cascading Style Sheets
its functionality may be moved into properties on the <img> and/or <picture> elements, with the possible exception of from-image.
outline - CSS: Cascading Style Sheets
WebCSSoutline
a notable exception is input elements, which are given default styling by browsers.
position - CSS: Cascading Style Sheets
WebCSSposition
les/9e/6ff6af6fd4.jpg"></p> css body { width: 500px; margin: 0 auto; } p { background: aqua; border: 3px solid blue; padding: 10px; margin: 10px; } span { background: red; border: 1px solid black; } .positioned { position: absolute; background: yellow; top: 30px; left: 30px; } result fixed positioning fixed positioning is similar to absolute positioning, with the exception that the element's containing block is the initial containing block established by the viewport, unless any ancestor has transform, perspective, or filter property set to something other than none (see css transforms spec), which then causes that ancestor to take the place of the elements containing block.
Creating a cross-browser video player - Developer guides
the exception to this is safari 5.1, which will only allow webkitrequestfullscreen to be called on the <video> element.
Creating and triggering events - Developer guides
this constructor is supported in most modern browsers (with internet explorer being the exception).
Localizations and character encodings - Developer guides
exception for minority languages if the localization is for minority language and the users are typically literate in the majority language of the region and read web content written in the majority language very often, it is appropriate to specify the fallback encoding and the heuristic detection mode to be the same as for the localization for the majority language of the region.
disabled - HTML: Hypertext Markup Language
note: if a <fieldset> is disabled, the descendant form controls are all disabled, with the exception of form controls within the <legend>.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
a tainted canvas is one which is no longer considered secure, and any attempts to retrieve image data back from the canvas will cause an exception to be thrown.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
in case of failure, an exception—depending on the api used—is raised.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
content-security-policy: default-src 'self'; img-src *; media-src media1.com media2.com; script-src userscripts.example.com here, by default, content is only permitted from the document's origin, with the following exceptions: images may load from anywhere (note the "*" wildcard).
Using HTTP cookies - HTTP
WebHTTPCookies
with strict, the cookie is sent only to the same site as the one that originated it; lax is similar, with an exception for when the user navigates to a url from an external site, such as by following a link; none has no restrictions on cross-site requests.
Feature-Policy: autoplay - HTTP
when this policy is enabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception.
Feature-Policy: document-domain - HTTP
when this policy is enabled, attempting to set document.domain will fail and cause a securityerror domexception to be be thrown.
Feature-Policy: encrypted-media - HTTP
when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception.
Feature-Policy: midi - HTTP
when this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a domexception.
Transfer-Encoding - HTTP
the terminating chunk is a regular chunk, with the exception that its length is zero.
HTTP
WebHTTP
with a few exceptions, policies mostly involve specifying server origins and script endpoints.
Working with objects - JavaScript
the exception to this rule is array-like object reflected from html, such as the forms array-like object.
About the JavaScript reference - JavaScript
errors chapter about specific errors, exceptions and warnings thrown by javascript.
TypeError: invalid Array.prototype.sort argument - JavaScript
the javascript exception "invalid array.prototype.sort argument" occurs when the argument of array.prototype.sort() isn't either undefined or a function which compares its operands.
RangeError: radix must be an integer - JavaScript
the javascript exception "radix must be an integer at least 2 and no greater than 36" occurs when the optional radix parameter of the number.prototype.tostring() or the bigint.prototype.tostring() method was specified and is not between 2 and 36.
SyntaxError: invalid regular expression flag "x" - JavaScript
the javascript exception "invalid regular expression flag" occurs when the flags, defined after the second slash in regular expression literal, are not one of g, i, m, s, u, or y.
SyntaxError: return not in function - JavaScript
the javascript exception "return (or yield) not in function" occurs when a return or yield statement is called outside of a function.
TypeError: X.prototype.y called on incompatible type - JavaScript
the javascript exception "called on incompatible target (or object)" occurs when a function (on a given object), is called with a this not corresponding to the type expected by the function.
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
the javascript exception "can't access lexical declaration `variable' before initialization" occurs when a lexical variable was accessed before it was initialized.
TypeError: can't access property "x" of "y" - JavaScript
the javascript exception "can't access property" occurs when property access was operated on undefined or null values.
TypeError: can't assign to property "x" on "y": not an object - JavaScript
the javascript strict mode exception "can't assign to property" occurs when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean.
TypeError: can't define property "x": "obj" is not extensible - JavaScript
the javascript exception "can't define property "x": "obj" is not extensible" occurs when object.preventextensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible.
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
the javascript exception "property is non-configurable and can't be deleted" occurs when it was attempted to delete a property, but that property is non-configurable.
TypeError: can't redefine non-configurable property "x" - JavaScript
the javascript exception "can't redefine non-configurable property" occurs when it was attempted to redefine a property, but that property is non-configurable.
TypeError: cyclic object value - JavaScript
the javascript exception "cyclic object value" occurs when object references were found in json.
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
the javascript strict mode-only exception "applying the 'delete' operator to an unqualified name is deprecated" occurs when variables are attempted to be deleted using the delete operator.
ReferenceError: deprecated caller or arguments usage - JavaScript
the javascript strict mode-only exception "deprecated caller or arguments usage" occurs when the deprecated function.caller or function.arguments properties are used.
SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript
the javascript strict mode-only exception "0-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead" occurs when deprecated octal literals and octal escape sequences are used.
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
var array = [10, 20, 30]; for (var x of array) { console.log(x); // 10 // 20 // 30 } iterating over a null-able array for each...in does nothing if the specified value is null or undefined, but for...of will throw an exception in these cases.
TypeError: setting getter-only property "x" - JavaScript
the javascript strict mode-only exception "setting getter-only property" occurs when there is an attempt to set a new value to a property for which only a getter is specified.
SyntaxError: identifier starts immediately after numeric literal - JavaScript
the javascript exception "identifier starts immediately after numeric literal" occurs when an identifier started with a digit.
SyntaxError: illegal character - JavaScript
the javascript exception "illegal character" occurs when there is an invalid or unexpected token that doesn't belong at this position in the code.
RangeError: invalid array length - JavaScript
the javascript exception "invalid array length" occurs when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when setting the array.length property to a value which is either negative or larger or equal to 232.
ReferenceError: invalid assignment left-hand side - JavaScript
the javascript exception "invalid assignment left-hand side" occurs when there was an unexpected assignment somewhere.
TypeError: invalid assignment to const "x" - JavaScript
the javascript exception "invalid assignment to const" occurs when it was attempted to alter a constant value.
RangeError: invalid date - JavaScript
the javascript exception "invalid date" occurs when a string leading to an invalid date has been provided to date or date.parse().
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
the javascript strict mode-only exception "for-in loop head declarations may not have initializers" occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|.
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
the javascript exception "a declaration in the head of a for-of loop can't have an initializer" occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|.
SyntaxError: JSON.parse: bad parsing - JavaScript
the javascript exceptions thrown by json.parse() occur when string failed to be parsed as json.
URIError: malformed URI sequence - JavaScript
the javascript exception "malformed uri sequence" occurs when uri encoding or decoding wasn't successful.
SyntaxError: Malformed formal parameter - JavaScript
the javascript exception "malformed formal parameter" occurs when the argument list of a function() constructor call is invalid somehow.
SyntaxError: missing ] after element list - JavaScript
the javascript exception "missing ] after element list" occurs when there is an error with the array initializer syntax somewhere.
SyntaxError: missing : after property id - JavaScript
the javascript exception "missing : after property id" occurs when objects are created using the object initializer syntax.
SyntaxError: missing } after function body - JavaScript
the javascript exception "missing } after function body" occurs when there is a syntax mistake when creating a function somewhere.
SyntaxError: missing } after property list - JavaScript
the javascript exception "missing } after property list" occurs when there is a mistake in the object initializer syntax somewhere.
SyntaxError: missing formal parameter - JavaScript
the javascript exception "missing formal parameter" occurs when your function declaration is missing valid parameters.
SyntaxError: missing = in const declaration - JavaScript
the javascript exception "missing = in const declaration" occurs when a const declaration was not given a value in the same statement (like const red_flag;).
SyntaxError: missing name after . operator - JavaScript
the javascript exception "missing name after .
SyntaxError: missing ) after argument list - JavaScript
the javascript exception "missing ) after argument list" occurs when there is an error with how a function is called.
SyntaxError: missing ) after condition - JavaScript
the javascript exception "missing ) after condition" occurs when there is an error with how an if condition is written.
SyntaxError: missing ; before statement - JavaScript
the javascript exception "missing ; before statement" occurs when there is a semicolon (;) missing somewhere and can't be added by automatic semicolon insertion (asi).
TypeError: More arguments needed - JavaScript
the javascript exception "more arguments needed" occurs when there is an error with how a function is called.
RangeError: repeat count must be non-negative - JavaScript
the javascript exception "repeat count must be non-negative" occurs when the string.prototype.repeat() method is used with a count argument that is a negative number.
TypeError: "x" is not a non-null object - JavaScript
the javascript exception "is not a non-null object" occurs when an object is expected somewhere and wasn't provided.
TypeError: "x" has no properties - JavaScript
the javascript exception "null (or undefined) has no properties" occurs when you attempt to access properties of null and undefined.
SyntaxError: missing variable name - JavaScript
the javascript exception "missing variable name" occurs way too often as naming things is so hard.
TypeError: can't delete non-configurable array element - JavaScript
the javascript exception "can't delete non-configurable array element" occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable.
RangeError: argument is not a valid code point - JavaScript
the javascript exception "invalid code point" occurs when nan values, negative integers (-1), non-integers (5.4), or values larger than 0x10ffff (1114111) are used with string.fromcodepoint().
TypeError: "x" is not a function - JavaScript
the javascript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value is not actually a function.
ReferenceError: "x" is not defined - JavaScript
the javascript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
RangeError: precision is out of range - JavaScript
the javascript exception "precision is out of range" occurs when a number that's outside of the range of 0 and 20 (or 21) was passed into tofixed or toprecision.
Error: Permission denied to access property "x" - JavaScript
the javascript exception "permission denied to access property" occurs when there was an attempt to access an object for which you have no permission.
TypeError: "x" is read-only - JavaScript
the javascript strict mode-only exception "is read-only" occurs when a global variable or object property that was assigned to is a read-only property.
SyntaxError: redeclaration of formal parameter "x" - JavaScript
the javascript exception "redeclaration of formal parameter" occurs when the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again.
TypeError: Reduce of empty array with no initial value - JavaScript
the javascript exception "reduce of empty array with no initial value" occurs when a reduce function is used.
SyntaxError: "x" is a reserved identifier - JavaScript
the javascript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers.
RangeError: repeat count must be less than infinity - JavaScript
the javascript exception "repeat count must be less than infinity" occurs when the string.prototype.repeat() method is used with a count argument that is infinity.
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
the javascript exception "'use strict' not allowed in function" occurs when a "use strict" directive is used at the top of a function with default parameters, rest parameters, or destructuring parameters.
InternalError: too much recursion - JavaScript
the javascript exception "too much recursion" or "maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case.
TypeError: invalid arguments - JavaScript
the javascript exception "invalid arguments" occurs when typed array constructors are provided with a wrong argument.
ReferenceError: assignment to undeclared variable "x" - JavaScript
the javascript strict mode-only exception "assignment to undeclated variable" occurs when the value has been assigned to an undeclared variable.
SyntaxError: Unexpected token - JavaScript
the javascript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
TypeError: "x" is (not) "y" - JavaScript
the javascript exception "x is (not) y" occurs when there was an unexpected type.
SyntaxError: function statement requires a name - JavaScript
the javascript exception "function statement requires a name" occurs when there is a function statement in the code that requires a name.
TypeError: variable "x" redeclares argument - JavaScript
the javascript strict mode-only exception "variable redeclares argument" occurs when the same variable name occurs as a function parameter and is then redeclared using a var assignment in a function body again.
TypeError: cannot use 'in' operator to search for 'x' in 'y' - JavaScript
the javascript exception "right-hand side of 'in' should be an object" occurs when the in operator was used to search in strings, or in numbers, or other primitive types.
TypeError: invalid 'instanceof' operand 'x' - JavaScript
the javascript exception "invalid 'instanceof' operand" occurs when the right hand side operands of the instanceof operator isn't used with a constructor object, i.e.
TypeError: 'x' is not iterable - JavaScript
the javascript exception "is not iterable" occurs when the value which is given as the right hand-side of for…of or as argument of a function such as promise.all or typedarray.from, is not an iterable object.
Array() constructor - JavaScript
if the argument is any other number, a rangeerror exception is thrown.
Array.prototype.reduce() - JavaScript
if len is 0 and initialvalue is not present, // throw a typeerror exception.
Array.prototype.every() - JavaScript
if iscallable(callbackfn) is false, throw a typeerror exception.
Array.prototype.find() - JavaScript
if iscallable(predicate) is false, throw a typeerror exception.
Array.prototype.findIndex() - JavaScript
if iscallable(predicate) is false, throw a typeerror exception.
Array.prototype.forEach() - JavaScript
(however, callback may do so) there is no way to stop or break a foreach() loop other than by throwing an exception.
Array.from() - JavaScript
a if iscallable(mapfn) is false, throw a typeerror exception.
Array.prototype.map() - JavaScript
if iscallable(callback) is false, throw a typeerror exception.
ArrayBuffer() constructor - JavaScript
exceptions a rangeerror is thrown if the length is larger than number.max_safe_integer (>= 2 ** 53) or negative.
Atomics.add() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.and() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.compareExchange() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.exchange() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.load() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.notify() - JavaScript
exceptions throws a typeerror, if typedarray is not a int32array.
Atomics.or() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.store() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.sub() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics.wait() - JavaScript
exceptions throws a typeerror, if typedarray is not a shared int32array.
Atomics.xor() - JavaScript
exceptions throws a typeerror, if typedarray is not one of the allowed integer types.
Atomics - JavaScript
if waiting is not allowed in the calling agent then it throws an error exception.
BigInt.prototype.toString() - JavaScript
exceptions rangeerror if tostring() is given a radix less than 2 or greater than 36, a rangeerror is thrown.
DataView() constructor - JavaScript
exceptions rangeerror thrown if the byteoffset or bytelength parameter values result in the view extending past the end of the buffer.
Date.prototype.toLocaleDateString() - JavaScript
to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaledatestringsupportslocales() { try { new date().tolocaledatestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales this example shows some of the variations in localized date formats.
Date.prototype.toLocaleString() - JavaScript
to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocalestringsupportslocales() { try { new date().tolocalestring('i'); } catch (e) { return e instanceof rangeerror; } return false; } using locales this example shows some of the variations in localized date and time formats.
Date.prototype.toLocaleTimeString() - JavaScript
to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaletimestringsupportslocales() { try { new date().tolocaletimestring('i'); } catch (e) { return e​.name === 'rangeerror'; } return false; } using locales this example shows some of the variations in localized time formats.
Error.prototype.message - JavaScript
spidermonkey makes extensive use of the message property for exceptions.
EvalError - JavaScript
this exception is not thrown by javascript anymore, however the evalerror object remains for compatibility.
Function.prototype.toString() - JavaScript
the tostring() method will throw a typeerror exception ("function.prototype.tostring called on incompatible object"), if its this value object is not a function object.
Generator.prototype.throw() - JavaScript
syntax gen.throw(exception) parameters exception the exception to throw.
Intl.Locale.prototype.script - JavaScript
there are exceptions to this rule, however, and it is important to indicate the script whenever possible, in order to have a complete unicode language identifier.
JSON.parse() - JavaScript
exceptions throws a syntaxerror exception if the string to parse is not valid json.
JSON.stringify() - JavaScript
exceptions throws a typeerror ("cyclic object value") exception when a circular reference is found.
Number.prototype.toExponential() - JavaScript
exceptions rangeerror if fractiondigits is too small or too large.
Number.prototype.toFixed() - JavaScript
exceptions rangeerror if digits is too small or too large.
Number.prototype.toLocaleString() - JavaScript
to check for support in es5.1 and later implementations, the requirement that illegal language tags are rejected with a rangeerror exception can be used: function tolocalestringsupportslocales() { var number = 0; try { number.tolocalestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } prior to es5.1, implementations were not required to throw a range error exception if tolocalestring is called with arguments.
Number.prototype.toPrecision() - JavaScript
exceptions rangeerror if precision is not between 1 and 100 (inclusive), a rangeerror is thrown.
Number.prototype.toString() - JavaScript
exceptions rangeerror if tostring() is given a radix less than 2 or greater than 36, a rangeerror is thrown.
Object.create() - JavaScript
exceptions the proto parameter has to be either null or an object excluding primitive wrapper objects.
Object.defineProperties() - JavaScript
if a descriptor has both value or writable and get or set keys, an exception is thrown.
Object.defineProperty() - JavaScript
if a descriptor has both value or writable and get or set keys, an exception is thrown.
Object.freeze() - JavaScript
any attempt to do so will fail, either silently or by throwing a typeerror exception (most commonly, but not exclusively, when in strict mode).
Object.getPrototypeOf() - JavaScript
examples using getprototypeof var proto = {}; var obj = object.create(proto); object.getprototypeof(obj) === proto; // true non-object coercion in es5, it will throw a typeerror exception if the obj parameter isn't an object.
Object.prototype.propertyIsEnumerable() - JavaScript
this method can determine whether the specified property in an object can be enumerated by a for...in loop, with the exception of properties inherited through the prototype chain.
Object.setPrototypeOf() - JavaScript
description throws a typeerror exception if the object whose [[prototype]] is to be modified is non-extensible according to object.isextensible().
Promise.prototype.catch() - JavaScript
g errors // throwing an error will call the catch method most of the time var p1 = new promise(function(resolve, reject) { throw new error('uh-oh!'); }); p1.catch(function(e) { console.error(e); // "uh-oh!" }); // errors thrown inside asynchronous functions will act like uncaught errors var p2 = new promise(function(resolve, reject) { settimeout(function() { throw new error('uncaught exception!'); }, 1000); }); p2.catch(function(e) { console.error(e); // this is never called }); // errors thrown after resolve is called will be silenced var p3 = new promise(function(resolve, reject) { resolve(); throw new error('silenced exception!'); }); p3.catch(function(e) { console.error(e); // this is never called }); if it is resolved //create a promise which would not call onrejec...
handler.getOwnPropertyDescriptor() - JavaScript
the result of object.getownpropertydescriptor(target) can be applied to the target object using object.defineproperty() and will not throw an exception.
handler.getPrototypeOf() - JavaScript
{ getprototypeof(target) { return array.prototype; } }); console.log( object.getprototypeof(p) === array.prototype, // true reflect.getprototypeof(p) === array.prototype, // true p.__proto__ === array.prototype, // true array.prototype.isprototypeof(p), // true p instanceof array // true ); two kinds of exceptions const obj = {}; const p = new proxy(obj, { getprototypeof(target) { return 'foo'; } }); object.getprototypeof(p); // typeerror: "foo" is not an object or null const obj = object.preventextensions({}); const p = new proxy(obj, { getprototypeof(target) { return {}; } }); object.getprototypeof(p); // typeerror: expected same prototype value specifications ...
handler.set() - JavaScript
in strict mode, a false return value from the set() handler will throw a typeerror exception.
Proxy - JavaScript
ow new typeerror('the age is not an integer'); } if (value > 200) { throw new rangeerror('the age seems invalid'); } } // the default behavior to store the value obj[prop] = value; // indicate success return true; } }; const person = new proxy({}, validator); person.age = 100; console.log(person.age); // 100 person.age = 'young'; // throws an exception person.age = 300; // throws an exception extending constructor a function proxy could easily extend a constructor with a new constructor.
RangeError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples using rangeerror (for numeric values) function check(n) { if( !(n >= -500 && n <= 500) ) { throw new rangeerror("the argument must be between -500 and 500.") } } try { check(2000) } catch(error) { if (error instanceof rangeerror) { // handle the error } } using rangeerror (for non-numeric values) function check(value) { if(["apple", "ban...
Reflect.apply() - JavaScript
exceptions a typeerror, if the target is not callable.
Reflect.construct() - JavaScript
exceptions a typeerror, if target or newtarget are not constructors.
Reflect.defineProperty() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.deleteProperty() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.get() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.getOwnPropertyDescriptor() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.getPrototypeOf() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.has() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.isExtensible() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.ownKeys() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.preventExtensions() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.set() - JavaScript
exceptions a typeerror, if target is not an object.
Reflect.setPrototypeOf() - JavaScript
exceptions a typeerror, if target is not an object or if prototype is neither an object nor null.
RegExp.prototype.dotAll - JavaScript
using both flags in conjunction allows the dot to match any unicode character, without exceptions.
String.fromCodePoint() - JavaScript
exceptions a rangeerror is thrown if an invalid unicode code point is given (e.g.
String.prototype.localeCompare() - JavaScript
to check whether an implementation supports them, use the "i" argument (a requirement that illegal language tags are rejected) and look for a rangeerror exception: function localecomparesupportslocales() { try { 'foo'.localecompare('bar', 'i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales the results provided by localecompare() vary between languages.
String.prototype.matchAll() - JavaScript
d ${match[0]} start=${match.index} end=${match.index + match[0].length}.`); } // expected output: "found football start=6 end=14." // expected output: "found foosball start=16 end=24." // matches iterator is exhausted after the for..of iteration // call matchall again to create a new iterator array.from(str.matchall(regexp), m => m[0]); // array [ "football", "foosball" ] matchall will throw an exception if the g flag is missing.
String.raw() - JavaScript
exceptions typeerror a typeerror is thrown if the first argument is not a well-formed object.
String.prototype.repeat() - JavaScript
exceptions rangeerror: repeat count must be non-negative.
String.prototype.toLocaleLowerCase() - JavaScript
exceptions a rangeerror ("invalid language tag: xx_yy") is thrown if a locale argument isn't a valid language tag.
String.prototype.toLocaleUpperCase() - JavaScript
exceptions a rangeerror ("invalid language tag: xx_yy") is thrown if a locale argument isn't a valid language tag.
String.prototype.toUpperCase() - JavaScript
exceptions typeerror when called on null or undefined, for example, string.prototype.touppercase.call(undefined).
Symbol() constructor - JavaScript
it may be used as the value of an extends clause of a class definition but a super call to it will cause an exception.
Symbol.iterator - JavaScript
using it as such is likely to result in runtime exceptions or buggy behavior: var nonwellformediterable = {} nonwellformediterable[symbol.iterator] = () => 1 [...nonwellformediterable] // typeerror: [] is not a function specifications specification ecmascript (ecma-262)the definition of 'symbol.iterator' in that specification.
SyntaxError() constructor - JavaScript
syntax new syntaxerror([message[, filename[, linenumber]]]) parameters message optional human-readable description of the error filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10)...
WebAssembly.Memory() constructor - JavaScript
exceptions if memorydescriptor is not of type object, a typeerror is thrown.
WebAssembly.Module.customSections() - JavaScript
exceptions if module is not a webassembly.module object instance, a typeerror is thrown.
WebAssembly.Module.exports() - JavaScript
exceptions if module is not a webassembly.module object instance, a typeerror is thrown.
WebAssembly.Module.imports() - JavaScript
exceptions if module is not a webassembly.module object instance, a typeerror is thrown.
WebAssembly.Table() constructor - JavaScript
exceptions if tabledescriptor is not of type object, a typeerror is thrown.
WebAssembly.Table.prototype.get() - JavaScript
exceptions if index is greater than or equal to table.prototype.length, a rangeerror is thrown.
WebAssembly.Table.prototype.grow() - JavaScript
exceptions if the grow() operation fails for whatever reason, a rangeerror is thrown.
WebAssembly.Table.prototype.set() - JavaScript
exceptions if index is greater than or equal to table.prototype.length, a rangeerror is thrown.
WebAssembly.compile() - JavaScript
exceptions if buffersource is not a typed array, a typeerror is thrown.
WebAssembly.compileStreaming() - JavaScript
exceptions if buffersource is not a typed array, a typeerror is thrown.
WebAssembly.instantiateStreaming() - JavaScript
exceptions if either of the parameters are not of the correct type or structure, a typeerror is thrown.
WebAssembly.validate() - JavaScript
exceptions if buffersource is not a typed array or arraybuffer, a typeerror is thrown.
decodeURI() - JavaScript
exceptions throws an urierror ("malformed uri sequence") exception when encodeduri contains invalid character sequences.
decodeURIComponent() - JavaScript
exceptions throws an urierror ("malformed uri sequence") exception when used wrongly.
escape() - JavaScript
special characters are encoded with the exception of: @*_+-./ the hexadecimal form for characters, whose code unit value is 0xff or less, is a two-digit escape sequence: %xx.
Exponentiation (**) - JavaScript
in most languages, such as php, python, and others that have an exponentiation operator (**), the exponentiation operator is defined to have a higher precedence than unary operators, such as unary + and unary -, but there are a few exceptions.
async function - JavaScript
return value a promise which will be resolved with the value returned by the async function, or rejected with an exception thrown from, or uncaught within, the async function.
Web app manifests
it is a json-formatted file, with one exception: it is allowed to contain "//"-style comments.
MathML documentation index - MathML
WebMathMLIndex
it accepts all attributes of all mathml presentation elements with some exceptions and additional attributes listed below.
Autoplay guide for media and Web Audio APIs - Web media technologies
nor is there an exception thrown or a callback you can set up or even a flag on the media element that tells you if autoplay worked.
Digital audio concepts - Web media technologies
note: while a high-quality lossy compression algorithm's effect on sound quality may be difficult for the average person to detect, certain people have exceptionally good hearing, or are particularly adept at noticing the kinds of changes introduced to music by lossy compression techniques.
Web video codec guide - Web media technologies
yes container support mpeg, mpeg-ts (mpeg transport stream), mp4, quicktime rtp / webrtc compatible no supporting/maintaining organization mpeg / itu specification https://www.itu.int/rec/t-rec-h.262 https://www.iso.org/standard/61152.html licensing proprietary; all patents have expired worldwide with the exception of in malaysia and the philippines as of april 1, 2019, so mpeg-2 can be used freely outside those two countries.
Performance fundamentals - Web Performance
fully static content is the exception rather than the rule for rich applications.
Privacy, permissions, and information security
privacy exceptions may be granted to specific sites or applications, but it may also be granted conditionally, such as by permitting only a select group of people to access it, or only allowing the information to be accessed and used for a limited period of time.
preserveAspectRatio - SVG: Scalable Vector Graphics
because the aspect ratio of an svg image is defined by the viewbox attribute, if this attribute isn't set, the preserveaspectratio attribute has no effect (with one exception, the <image> element, as described below).
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
n :focus and ::selection styles implementation status unknown geometry change notes x and y attributes removed from <pattern> and <filter> implementation status unknown auto value of width and height computes to 0 but 100% on <svg> not implemented coordinate systems, transformations and units change notes exception for bad values on svgmatrix.skewx() and svgmatrix.skewy() implementation status unknown bounding box for element with no position at (0, 0) implementation status unknown defer keyword removed from preserveaspectratio attribute removed (bug 1280425) added non-scaling-size, non-rotation and fixed-position keywords for vector-effect property not implemented yet...
Scripting - SVG: Scalable Vector Graphics
WebSVGScripting
setproperty has three parameters the function svgelement.style.setproperty("fill-opacity", "0.0") throws a domexception - syntax err in mozilla.
Specification Deviations - SVG: Scalable Vector Graphics
however, there are two exceptions.
Transport Layer Security - Web security
for the web, tls 1.3 can be enabled without affecting compatibility with some rare exceptions (see below).
Compiling from Rust to WebAssembly - WebAssembly
it allows javascript to call a rust api with a string, or a rust function to catch a javascript exception.
Using the WebAssembly JavaScript API - WebAssembly
growing memory a memory instance can be grown by calls to memory.prototype.grow(), where again the argument is specified in units of webassembly pages: memory.grow(1); if a maximum value was supplied upon creation of the memory instance, attempts to grow past this maximum will throw a webassembly.rangeerror exception.