Everything2
Near Matches
Ignore Exact
Full Text
Everything2

DOMException

created by funnytoes

(thing) by funnytoes (6 y) (print)   ?   (I like it!) Sun Feb 25 2001 at 16:02:15

Home to Document Object Model | Up to Core
Next DOMImplementation


DOMException
Object

DOMException makes use of the implementation's exception handling model. (Where this is not suitable, the implementation should provide an alternative means of indicating the exception.) In ECMAScript, the try/catch construct can be used.

A DOMException will be raised where an operation is impossible to perform. The list below can be extended by the implementation for implementation-specific exceptions.

ExceptionCode
Attribute
ECMAScript binding: code (Number)

ExceptionCode identifies the exception condition. DOM Level 2 defines the following ExceptionCode constants (bound as attributes of DOMException in ECMAScript):

  • DOMSTRING_SIZE_ERR. . . . . - trying to make a DOMString that's too long.
  • HIERARCHY_REQUEST_ERR . . . - trying to insert a node in the wrong place.
  • INDEX_SIZE_ERR. . . . . . . - trying to index outside an array (or list of nodes, etc).
  • INUSE_ATTRIBUTE_ERR . . . . - trying to add an attribute that is in use.
  • INVALID_ACCESS_ERR. . . . . - trying to access an attribute or method that the (underlying) object doesn't provide.
  • INVALID_CHARACTER_ERR . . . - trying to use a character that is illegal in this context.
  • INVALID_MODIFICATION_ERR. . - trying to modify the type of the underlying object.
  • INVALID_STATE_ERR . . . . . - trying to use an object that is not/no longer usable.
  • NAMESPACE_ERR . . . . . . . - trying to do something that violates namespace rules.
  • NOT_FOUND_ERR . . . . . . . - trying to access a node that doesn't exist (in this context).
  • NOT_SUPPORTED_ERR . . . . . - trying to access a feature that this DOMImplementation does not support.
  • NO_DATA_ALLOWED_ERR . . . . - trying to specify data for a node that doesn't allow it.
  • NO_MODIFICATION_ALLOWED_ERR - trying to modify an object that doesn't allow it.
  • SYNTAX_ERR. . . . . . . . . - trying to use an illegal (in this context) string.
  • WRONG_DOCUMENT_ERR. . . . . - trying to use a node that isn't supported by this document.

printable version
chaos

DOMImplementation DOM2-Core node document object model
DOMTimeStamp
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
Lindisfarne
High Infection Protocol
The Monster at the End of This Book
Labor theory of value
Detonation
classroom management
December 20, 2005
scallop
Noding for Numbers
Nature's Harmonic Simultaneous 4-day Time Cube
9.8 m/s^2
Everything Perpetual Calendar
I was only following orders
New Writeups
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
calgon
Buffalo Bill by the pool(poetry)
gate
Anarchy is Order(idea)
ushdfgakjasgh
Scribeling(thing)
XWiz
Trism(review)
artman2003
Briefcase Full of Souls - Part I(fiction)
Dreamvirus
Alan Ladd(person)
waverider37
Harold Holt(person)
The Debutante
Until death do us part(fiction)
Ysardo
a brother to a sister(personal)
antigravpussy
your warm whispers(personal)
Clarke
Multiculturalism(idea)
Everything 2 is brought to you by the letter C and The Everything Development Company