Search completed in 0.94 seconds.
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 js
exception extends runtime
exception java.lang.object | +----java.lang.throwable | +----java.lang.
exception | +----java.lang.runtime
exception | +----netscape.javascript.js
exception description js
exception is an
exception which is thrown when javascript code returns an error.
... constructor summary the netscape.javascript.js
exception class has the following constructors: js
exception deprecated constructors optionally let you specify a detail message and other information.
... method summary the netscape.javascript.js
exception class has the following methods: getwrapped
exception instance method getwrapped
exception.
...And 12 more matches
JS_IsExceptionPending
determine whether an
exception is pending in the js engine.
... syntax bool js_is
exceptionpending(jscontext *cx); name type description cx jscontext * pointer to a js context to check for pending
exceptions.
... description js_is
exceptionpending 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_setpending
exception(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 dom
exception 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 dom
exception() returns a dom
exception object with a specified message and name.
...And 6 more matches
JS_ClearPendingException
clear the currently pending
exception in a context.
... syntax void js_clearpending
exception(jscontext *cx); name type description cx jscontext * the context in which the
exception was thrown.
... description js_clearpending
exception 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_reportpending
exception(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_reportpending
exception 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 js
exceptionstate * js_save
exceptionstate(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 js
exceptionstate object holding this state.
...And 5 more matches
JS_RestoreExceptionState
restores the
exception state from a js
exceptionstate object previously created using js_save
exceptionstate.
... syntax void js_restore
exceptionstate(jscontext *cx, js
exceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... state js
exceptionstate * pointer to the js
exceptionstate object to restore
exception state from.
...And 4 more matches
JS_DropExceptionState
destroys a js
exceptionstate object previously created using js_save
exceptionstate.
... syntax void js_drop
exceptionstate(jscontext *cx, js
exceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... state js
exceptionstate * pointer to the js
exceptionstate object to destroy.
...And 3 more matches
JS_ErrorFromException
get or create jserrorreport from an
exception object.
... syntax jserrorreport * js_errorfrom
exception(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/xpc
exception.idlscriptable these
exception objects are the preferred types of
exceptions when implementing xpcom interfaces in javascript.
... inherits from: nsi
exception 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 nsi
exception 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 nsi
exception ainner ); parameters amessage aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval(); parameters none.
...And 3 more matches
DOMException() - Web APIs
the dom
exception() constructor returns a dom
exception object with a specified message and name.
... syntax var dom
exception = new dom
exception(); var dom
exception = new dom
exception(message); var dom
exception = new dom
exception(message, name); parameters message optional a description of the
exception.
... return value dom
exception a newly created dom
exception 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::autosave
exceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description js::autosave
exceptionstate 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_getpending
exception(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.setnonusercode
exceptions 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.setnonusercode
exceptions [= 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.setnonusercode
exceptions = true; try{ var x = null; x.y(); } catch (e) { // catch the
exception.
Components.Exception
summary components.
exception is a javascript constructor to create nsixpc
exception 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 nsixpc
exception.
... 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 dom
exception.
... in the indexeddb api, an idbdatabase
exception 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 internetidbdatabase
exception 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 ...
JSExceptionState
this is used to save and restore
exception states.
... syntax struct js
exceptionstate; description a js
exceptionstate object is returned by the js_save
exceptionstate function, and is passed to functions js_restore
exceptionstate and js_drop
exceptionstate.
... see also mxr id search for js
exceptionstate js_save
exceptionstate js_restore
exceptionstate js_drop
exceptionstate ...
nsIException
xpcom/base/nsi
exception.idlscriptable please add a summary to this article.
... inner nsi
exception an inner
exception that triggered this, if available.
... result nsresult the nsresult associated with this
exception.
nsIXSLTException
content/xslt/public/nsixslt
exception.idlscriptable please add a summary to this article.
... inherits from: nsi
exception 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
the code read-only property of the dom
exception 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 dom
exception.name attribute.
... syntax var dom
exceptioncode = dom
exceptioninstance.code; value a short number.
FileException - Web APIs
in the file system api, a file
exception object represents error conditions that you might encounter while accessing the file system using the synchronous api.
... it extends the file
exception interface described in file writer and adds several new error codes.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfile
exception 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 xpath
exception 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 'xpath
exception' in that specification.
XPathException - Web APIs
in the dom xpath api the xpath
exception interface represents
exception conditions that can be encountered while performing xpath operations.
... properties xpath
exception.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 'xpath
exception' in that specification.
nsIDOMFileException
the nsidomfile
exception interface represents
exceptions that can be raised by calls to the methods in the nsidomfile interface.
... content/base/public/nsidomfile
exception.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 dom
exception interface returns a domstring representing a message or description associated with the given error name.
... syntax var dom
exceptionmessage = dom
exceptioninstance.message; value a domstring.
DOMException.name - Web APIs
the name read-only property of the dom
exception interface returns a domstring that contains one of the strings associated with an error name.
... syntax var dom
exceptionname = dom
exceptioninstance.name; value a domstring.
NPN_SetException - Archive of obsolete content
syntax #include <npruntime.h> void npn_set
exception(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/nsidomxpath
exception.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 setreportalljs
exceptions(in boolean reportalljs
exceptions); 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 pending
exception nsi
exception 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 a
exceptionhandling" argument, defaulting to ereport
exceptions.
... if areport
exceptions is set to ereport
exceptions, the methods will report js
exceptions before returning.
... if areport
exceptions is set to erethrow
exceptions, 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
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 dom
exception is raised.
...And 27 more matches
Index
24 js::autosave
exceptionstate jsapi reference, reference, référence(2), spidermonkey js::autosave
exceptionstate 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 dom
exception 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 (idbdatabase
exception); idbindexsync createindex (in domstring name, in domstring storename, in domstring keypath, in optional boolean unique); any get (in any key) raises (idbdatabase
exception); idbcursorsync opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabase
exception); idbindexsync openindex (in domstring name) raises (idbdatabase...
...
exception); any put (in any value, in optional any key) raises (idbdatabase
exception); void remove (in any key) raises (idbdatabase
exception); void removeindex (in domstring indexname) raises (idbdatabase
exception); 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 (idbdatabase
exception); any get (in any key) raises (idbdatabase
exception); any getobject (in any key) raises (idbdatabase
exception); void opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabase
exception); void openobjectcursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabase
exception); an...
...y put (in any value, in optional any key) raises (idbdatabase
exception); void remove (in any key) raises (idbdatabase
exception); 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.
... uncaught
exceptionhook 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
18 components.
exception xpcom:language bindings, xpconnect components.
exception is a javascript constructor to create nsixpc
exception 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_setpending
exception 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 appendobjc
exceptioninfotoappnotes(in voidptr a
exception); native code only!
... void writeminidumpfor
exception(in voidptr a
exceptioninfo); 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 dom
exception 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 dom
exception 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 (idbdatabase
exception); idbobjectstoresync openobjectstore (in domstring name, in optional unsigned short mode) raises (idbdatabase
exception); void removeobjectstore (in domstring storename) raises (idbdatabase
exception); void setversion (in domstring version); idbtransactionsync transaction (in optional domstringlist storenames, in optional unsigned int timeout) raises (idbdatabas...
...e
exception); 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 (idbdatabase
exception); 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 (file
exception); filesystementrysync moveto (in directoryentrysync parent, optional domstring newname) raises (file
exception); filesystementrysync copyto(in directoryentrysync parent, optional domstring newname) raises (file
exception); domstring tourl(); void remove() raises (file
exception); directoryentrysync getparent(); attributes attribute typ...
...[ todo: specify what kind of metadata ] metadata getmetada () raises (file
exception); parameter none returns metadata
exceptions this method can raise a file
exception with the following codes:
exception description not_found_err the entry does not exist.
... filesystementrysync moveto ( in directoryentrysync parent, optional domstring newname ) raises (file
exception); parameters parent the directory to which to move the entry.
...And 6 more matches
SVGPathSegList - Web APIs
exceptions: a dom
exception with code no_modification_allowed_err is raised when the list cannot be modified.
...
exceptions: a dom
exception with code no_modification_allowed_err is raised when the list cannot be modified.
...
exceptions: a dom
exception 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 dom
exception is raised.
...if this css value doesn't contain a float value or can't be converted into the specified unit, a dom
exception is raised.
...And 5 more matches
DirectoryEntrySync - Web APIs
var direntry = fs.root.getdirectory('superseekrit', {create: true}); method overview directoryreadersync createreader () raises (file
exception); fileentrysync getfile (in domstring path, in optional flags options) raises (file
exception); directoryentrysync getdirectory (in domstring path, in optional flags options) raises (file
exception); void removerecursively () raises (file
exception); methods createreader() creates a new directoryreadersync to read entries from this directory.
... directoryreadersync createreader ( ) raises (file
exception); returns directoryreadersync represents a directory in a file system.
... parameter none
exceptions this method can raise a file
exception 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
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 dom
exception 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 dom
exception 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
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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception.
...when this policy is disabled, the promise returned by navigator.getbattery() will reject with a notallowederror dom
exception.
...when this policy is disabled, the promise returned by getusermedia() will reject with a notallowederror dom
exception.
...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 dom
exception with the hierarchyrequesterror name is thrown.
...when set, if the object doesn't represent a <thead>, a dom
exception with the hierarchyrequesterror name is thrown.
...when set, if the object doesn't represent a <tfoot>, a dom
exception 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 nsi
exception for more information.
... globals functions from
exception(
exception) attempts to extract the traceback from
exception.
... parameters
exception :
exception exception where
exception is an nsi
exception.
...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 user
exception(message) { this.message = message; this.name = "user
exception"; } function dothing() { throw new user
exception("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 (file
exception); file file () raises (file
exception); methods createwriter() creates a new filewriter associated with the file that the fileentry represents.
... void createwriter ( ) raises (file
exception); parameter none.
... returns filewritersync
exceptions this method can raise a file
exception with the following codes:
exception description not_found_err the file does not exist.
...And 2 more matches
IDBRequest.error - Web APIs
in chrome 48+/firefox 58+ this property returns a dom
exception 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 (idbdatabase
exception); void commit() raises (idbdatabase
exception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabase
exception); attributes attribute type description db idbdatabasesync the database connection that this transaction is associated with.
... void abort( ) raises (idbdatabase
exception);
exceptions this method can raise an idbdatabase
exception with the following code: non_transient_err if this transaction has already been committed or aborted.
... void commit( ) raises (idbdatabase
exception);
exceptions this method can raise an idbdatabase
exception 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 xpath
exception of type invalid_expression_err is raised.
... type_err in case result cannot be converted to the specified type, an xpath
exception of type type_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a dom
exception 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 xpath
exception of type invalid_expression_err is raised.
... type_err in case result cannot be converted to the specified type, an xpath
exception of type type_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a dom
exception of type namespace_error is raised.
...And 2 more matches
Index - HTTP
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 dom
exception.
...when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a dom
exception.
...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_reportpending
exception ...
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
eporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfile
exceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindow...
...idomnavigatordesktopnotificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsidomstoragewindownsidomuserdatahandlernsidomwindownsidomwindow2nsidomwindowinternalnsidomwindowutilsnsidomxpathevaluatornsidomxpath
exceptionnsidomxpathexpressionnsidomxpathresultnsidomxulcontrolelementnsidomxulelementnsidomxullabeledcontrolelementnsidomxulselectcontrolelementnsidomxulselectcontrolitemelementnsidatasignatureverifiernsidebugnsidebug2nsidevicemotionnsidevicemotiondatansidevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiter...
...sslistenernsidownloadernsidragdrophandlernsidragservicensidragsessionnsidroppedlinkhandlernsidroppedlinkitemnsidynamiccontainernsieditornsieditorboxobjectnsieditordocshellnsieditorimesupportnsieditorloggingnsieditormailsupportnsieditorobservernsieditorspellchecknsieffectivetldservicensienumeratornsienvironmentnsierrorservicensieventlistenerinfonsieventlistenerservicensieventsourcensieventtargetnsi
exceptionnsiextensionmanagernsiexternalhelperappservicensiexternalprotocolservicensiexternalurlhandlerservicensiftpchannelnsiftpeventsinknsifactorynsifavicondatacallbacknsifaviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifeedprocessornsifeedprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsif...
...inapphelpernsiwintaskbarnsiwindowcreatornsiwindowmediatornsiwindowwatchernsiwindowsregkeynsiwindowsshellservicensiworkernsiworkerfactorynsiworkerglobalscopensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpc
exceptionnsixpcscriptablensixpconnectnsixslt
exceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsm...
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
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 dom
exception 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 dom
exception object providing details about the
exception that was thrown by a mediarecorder instance.
... syntax error = mediarecordererrorevent.error; value a dom
exception 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 dom
exception 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 dom
exception 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
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 dom
exception 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 file
exception 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 idbdatabase
exception 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 xpath
exception 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
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 dom
exception to be be thrown.
...when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a dom
exception.
...when this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a dom
exception.
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 nsi
exception object.
...the callback is passed an error argument: this is an nsi
exception object.
...the callback is passed an error argument: this is an nsi
exception 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 js
exception 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_set
exception 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 (filenotfound
exception e) { // this
exception is thrown if gregrepathwithproperties cannot find a gre } catch (xpcom
exception 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 filenotfound
exceptions 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 (xpcom
exception 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: java
exception: the original
exception thrown by the java method rhino
exception: 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.java
exception instanceof java.lang.classnotfound
exception) { 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.java
exception instanceof java.lang.classnotfound
exception) { print("class " + name + " not found"); } catch...
... (e if e.java
exception instanceof java.lang.nullpointer
exception) { print("class name is null"); } } classforname("nonexistingclass"); classforname(null); ...
JSNative
js_reporterror or js_reportoutofmemory) or raise an
exception (using js_setpending
exception), 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_setpending
exception ...
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.nsixpc
exception) { // 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 nsixpc
exception 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
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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 (idbdatabase
exception); 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 idbdatabase
exception 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 (database
exception);
exceptions this method can raise an idbdatabase
exception 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 (idbdatabase
exception); methods open() opens and returns a connection to a database.
... idbdatabasesync open ( in domstring name, in domstring description ) raises (idbdatabase
exception); parameters name the name for the database.
...
exceptions this method can raise an idbdatabase
exception with the following codes: non_transient_err if the name parameter is not valid.
IDBIndex.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 dom
exception 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 dom
exception 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 dom
exception 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 file
exception; entrysync resolvelocalfilesystemsyncurl (in domstring url) raises file
exception; 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 file
exception 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 file
exception 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 dom
exception 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
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 (dom
exception err) { ...
RTCPeerConnection.createAnswer() - Web APIs
failurecallback an rtcpeerconnectionerrorcallback which will be passed a single dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
SourceBuffer.mode - Web APIs
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
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 dom
exception 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.
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.
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.
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.
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.
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 throwjs
exception(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.classnotfound
exception: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.io
exception: 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_setpending
exception, 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_setpending
exception() 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::autosave
exceptionstate 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_errorfrom
exception 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_is
exceptionpending js_getpending
exception js_setpending
exception js_clearpending
exception js_throwstopiteration added in spidermonkey 1.8 js_isstopiteration added in spidermonkey 31 typedef js
exceptionstate js_save
exceptionstate js_restore
exceptionstate js_drop
exceptionstate these functions translate errors into
exceptions and vice versa: js_reportpending
exception js_errorfrom
exception 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.getpending
exception->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 nsidomxpath
exception nsidomxpathexpression nsidomxpathresult xslt nsixslt
exception 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 nsi
exception 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.uncaught
exceptionhook = handleuncaught
exception; // find the current tab's main content window.
... plot(log); } function handleuncaught
exception(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
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
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 dom
exception is raised.
...
exceptions type description dom
exception 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 dom
exception is raised.
...
exceptions type description dom
exception 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 dom
exception is raised.
...
exceptions type description dom
exception 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 dom
exception is raised.
...
exceptions type description dom
exception 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 dom
exception is raised.
...
exceptions type description dom
exception 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 dom
exception will be raised.
...
exceptions type description dom
exception 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 dom
exception will be raised.
...
exceptions type description dom
exception 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.
... dom
exception (name: quotaexceedederror) the requested length exceeds 65,536 bytes.
DOMMatrix - Web APIs
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 (file
exception); method readentries() returns a lost of entries from a specific directory.
... entrysync readentries ( ) raises (file
exception); returns parameter none
exceptions this method can raise a file
exception 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
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 dom
exception 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 svg
exception 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
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
— 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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
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
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 dom
exception of one of the following types:
exception description invalidstateerror the close() method has previously been called on this idbdatabase instance.
IDBFactory.cmp() - Web APIs
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 dom
exception 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 dom
exception 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 dom
exception.
...
exceptions
exception description invalidstateerror the transaction state is not active.
IDBTransaction.error - Web APIs
in chrome 48+/firefox 58+ this property returns a dom
exception 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: webkitdom
exception 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 dom
exception 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
if the assignment can't happen because of a security violation, a dom
exception of the security_error type is thrown.
... if the provided url is not valid, a dom
exception of the syntax_error type is thrown.
Location: replace() - Web APIs
if the assignment can't happen because of a security violation, a dom
exception of the security_error type is thrown.
... if the provided url is not valid, a dom
exception of the syntax_error type is thrown.
MediaDevices.getDisplayMedia() - Web APIs
exceptions rejections of the returned promise are made by passing a dom
exception 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 dom
exception describing the error that occurred.
... error read only a dom
exception 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.
Navigator.getBattery() - Web APIs
exceptions this method doesn't throw true
exceptions; instead, it rejects the returned promise, passing into it a dom
exception 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
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 == dom
exception.not_supported_err) { window.location.href = 'https://bobpay.xyz/#download'; } else { // other kinds of errors; cancelled or failed payment.
RTCError - Web APIs
it's based upon the standard dom
exception interface that describes general dom errors.
... properties in addition to the properties defined by the parent interface, dom
exception, 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 dom
exception 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 dom
exception 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 dom
exception object describing the error which occurred.
RTCPeerConnection.setLocalDescription() - Web APIs
it is passed a single dom
exception 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 dom
exception with code invalid_state_err is thrown.
...if the simple duration is undefined (e.g., the end time is indefinite), then a dom
exception with code not_supported_err is raised.
SVGMarkerElement - Web APIs
exceptions: a dom
exception with code no_modification_allowed_err is raised when the object itself is read only.
...
exceptions: a dom
exception with code no_modification_allowed_err is raised when the object itself is read only.
SVGMatrix - Web APIs
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 dom
exception 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
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 dom
exception 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 dom
exception 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: dom
exception}); parameters type will always be 'sensorerrorevent'.
... options optional currently only one option is supported: error: an instance of dom
exception.
SensorErrorEvent.error - Web APIs
the error read-only property of the sensorerrorevent interface returns the dom
exception object passed in the event's contructor.
... syntax var dom
exception = sensorerrorevent.error; value a dom
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
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.io
exception; import java.io.inputstream; import java.io.outputstream; import java.net.serversocket; import java.net.socket; import java.security.messagedigest; import java.security.nosuchalgorithm
exception; 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 io
exception, nos...
...uchalgorithm
exception { 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 dom
exception && ( // 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 xpath
exception of type invalid_expression_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a dom
exception 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 xpath
exception of type type_err is thrown.
... invalid_state_err if the document is mutated since the result was returned, an xpath
exception of type invalid_state_err is thrown.
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 dom
exception.
...
exceptions rather than throwing true
exceptions, issessionsupported() rejects the returned promise, passing to the rejection handler a dom
exception 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
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
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
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.
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.
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).
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
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.
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.
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.
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.
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.
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.
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.
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).
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(...
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 ...
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...
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);"/> ...
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.
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.
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_set
exception() see also npclass ...
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 ...
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 negativearraysize
exception description the javaarray object is an instance of a java array that is created in or passed to javascript.
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).
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.
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.
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...
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
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 nsidomfile
exception 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 nsidomfile
exception ...
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().
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 nsidomxpath
exception ...
nsIDOMXPathResult
see also introduction to using xpath in javascript document object model (dom) level 3 xpath specification nsidomxpathevaluator document.evaluate nsidomxpath
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.
nsISearchEngine
if null, will default to "text/html"
exceptions thrown ns_error_invalid_arg if name or value are null.
nsIXmlRpcClient
via nsixpconnect::getpending
exception()->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
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.
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.
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_set
exception 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_set
exception 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...
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 ...
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?
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.
AbortController - Web APIs
}).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with a dom
exception named aborterror.
AbortSignal - Web APIs
current version of firefox rejects the promise with a dom
exception 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 dom
exception with the name indexsizeerror is thrown.
Animation.cancel() - Web APIs
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 dom
exception named aborterror.
Animation.pause() - Web APIs
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).
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.
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.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.
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.setProperty() - Web APIs
the following values are accepted: string value "important" keyword undefined string empty value "" return value undefined
exceptions dom
exception (nomodificationallowederror): if the property or declaration block is read only.
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.
CacheStorage.has() - Web APIs
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.
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).
Console.error() - Web APIs
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
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.
ContentIndex.add() - Web APIs
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.
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.
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" dom
exception.
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.
DOMParser - Web APIs
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.
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
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.
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.
Element.classList - Web APIs
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.dom
exception) (dom
exception = 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 dom
exception( "failed to execute '" + o + "' on 'domtokenlist': the token provided must not be empty." ); if((wsindex=v.search(wsre))!==-1) throw new dom
exception("failed to execute '"+o+"' on 'd...
Element.innerHTML - Web APIs
exceptions syntaxerror an attempt was made to set the value of innerhtml using a string which is not properly-formed html.
Element.setAttribute() - 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
best practices most people don't read the page on errors and
exceptions unless they're stumped.
FileReader.abort() - Web APIs
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
in chrome 48+/firefox 58+ this property returns a dom
exception because domerror has been removed from the dom standard.
FileReader - Web APIs
properties filereader.error read only a dom
exception representing the error that occurred while reading the file.
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.
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.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.
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 - 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.
IDBCursor.advance() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception 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 dom
exception of one of the following types:
exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor.delete() - Web APIs
exceptions this method may raise a dom
exception of one of the following types:
exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor.source - Web APIs
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
exceptions this method may raise a dom
exception of one of the following types:
exception description transactioninactiveerror this idbcursor's transaction is inactive.
IDBCursor - Web APIs
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.createObjectStore() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception 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 dom
exception 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
exceptions this method may raise a dom
exception 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
exceptions this method may raise a dom
exception of one of the following types:
exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.get() - Web APIs
exceptions this method may raise a dom
exception of one of the following types:
exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.getKey() - Web APIs
exceptions this method may raise a dom
exception of one of the following types:
exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBIndex.name - Web APIs
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 dom
exception 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 dom
exception of one of the following types:
exception description transactioninactiveerror this idbindex's transaction is inactive.
IDBKeyRange.bound() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception 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 dom
exception of the following type:
exception description dataerror the value parameter passed was not a valid key.
IDBKeyRange.only() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception of the following type:
exception description dataerror the value parameter passed was not a valid key.
IDBObjectStore.add() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception 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 dom
exception of one of the following types:
exception description invalidstateerror this idbobjectstore has been deleted.
IDBObjectStore.createIndex() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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 dom
exception 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.openCursor() - Web APIs
exceptions this method may raise a dom
exception 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 dom
exception 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 dom
exception of one of the following types:
exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBTransaction.abort() - Web APIs
syntax transaction.abort();
exceptions this method may raise a dom
exception 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 dom
exception of one of the following types:
exception description notfounderror the requested object store is not in this transaction's scope.
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 dom
exception.
IndexedDB API - Web APIs
idbdatabase
exception 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.
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.
MediaRecorder - Web APIs
the received event is based on the mediarecordererrorevent interface, whose error property contains a dom
exception that describes the actual error that occurred.
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.
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 dom
exception of type notsupportederror if mediastreamtrack.kind is not "video".
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.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.
NDEFReader.scan() - Web APIs
exceptions this method doesn't throw true
exceptions; instead, it rejects the returned promise, passing into it a dom
exception whose name is one of the following: aborterror the scan operation was aborted with abortsignal passed in options.
NDEFWriter.write() - Web APIs
exceptions this method doesn't throw true
exceptions; instead, it rejects the returned promise, passing into it a dom
exception whose name is one of the following: aborterror the write operation was aborted with abortsignal passed in options.
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 dom
exception.
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 dom
exception whose name indicates what kind of error occurred.
NodeIterator.nextNode() - Web APIs
in old browsers, as specified in old versions of the specifications, the method may throws the invalid_state_err dom
exception 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 dom
exception if this method is called after the nodeiterator.detach()method.
Permissions.query() - Web APIs
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.
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.
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 dom
exception 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.
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.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.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.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).
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.
Range.setEnd() - Web APIs
exceptions
exceptions are thrown as dom
exception 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 - Web APIs
living standard do not use range
exception anymore, use dom
exception instead.
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.
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.
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) { handle
exception(e); } } specifications not currently part of the mse specification.
StaticRange.StaticRange() - Web APIs
exceptions invalidnodetypeerror a dom
exception 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
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.splitText() - Web APIs
exceptions thrown a dom
exception 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 dom
exception 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
exceptions index_size_err a dom
exception 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.
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
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.
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.
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.
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.
Window.fullScreen - Web APIs
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
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.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.
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.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.send() - Web APIs
exceptions
exception description invalidstateerror send() has already been invoked for the request, and/or the request is complete.
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.singleNodeValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not any_unordered_node_type or first_ordered_node_type, an xpath
exception 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 xpath
exception 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 xpath
exception of type type_err is thrown.
XRFrame.getViewerPose() - Web APIs
exceptions invalidstateerror a dom
exception 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.
XRSession.requestReferenceSpace() - Web APIs
exceptions rather than throwing true
exceptions, requestreferencespace() rejects the returned promise with a dom
exception whose name is found in the list below: notsupportederror the requested reference space is not supported.
XRSpace - Web APIs
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 dom
exception 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.
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 - 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
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.
<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.
float - CSS: Cascading Style Sheets
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").
position - CSS: Cascading Style Sheets
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.
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.
Content Security Policy (CSP) - HTTP
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
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 dom
exception.
Feature-Policy: midi - HTTP
when this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a dom
exception.
HTTP
with a few
exceptions, policies mostly involve specifying server origins and script endpoints.
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.
Atomics - JavaScript
if waiting is not allowed in the calling agent then it throws an error
exception.
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.
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.
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.
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.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.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 ...
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...
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)...
decodeURI() - JavaScript
exceptions throws an urierror ("malformed uri sequence")
exception when encodeduri contains invalid character sequences.
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.
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.
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...