Ember Namespace
Defined in: packages/ember-metal/lib/core.js:8
Module: ember-metal
All Ember methods and functions are defined inside of this namespace. You generally should not add new properties to this namespace as it may be overwritten by future versions of Ember.
You can also use the shorthand Em instead of Ember.
Ember-Runtime is a framework that provides core functions for Ember including cross-platform functions, support for property observing and objects. Its focus is on small size and performance. You can use this in place of or along-side other cross-platform libraries such as jQuery.
The core Runtime framework is based on the jQuery API with a number of performance optimizations.
Methods
- $
- A
- K
- addListener
- alias
- aliasMethod
- assert
- beforeObserver
- beginPropertyChanges
- bind
- cacheFor
- canInvoke
- changePropertiess
- compare
- computed
- computed.alias
- computed.and
- computed.any
- computed.bool
- computed.defaultTo
- computed.empty
- computed.equal
- computed.gt
- computed.gte
- computed.lt
- computed.lte
- computed.map
- computed.match
- computed.none
- computed.not
- computed.notEmpty
- computed.or
- copy
- create
- debug
- defineProperty
- deprecate
- deprecateFunc
- destroy
- endPropertyChanges
- generateGuid
- get
- guidFor
- handleErrors
- hasListeners
- immediateObserver
- inspect
- isArray
- isEmpty
- isEqual
- isGlobalPath
- isNone
- keys
- listenersFor
- makeArray
- meta
- metaPath
- mixin
- normalizePath
- normalizeTuple
- observer
- onLoad
- oneWay
- propertyDidChange
- propertyWillChange
- removeListener
- renderToBuffer
- required
- rewatch
- runLoadHooks
- sendEvent
- set
- setProperties
- suspendListener
- trigger
- tryCatchFinally
- tryFinally
- tryInvoke
- trySet
- typeOf
- warn
- watch
- watchedEvents
- wrap
Properties
- ENV
- EXTEND_PROTOTYPES
- GUID_KEY
- LOG_BINDINGS
- LOG_STACKTRACE_ON_DEPRECATION
- LOG_VERSION
- META_KEY
- SHIM_ES5
- STRINGS
- TEMPLATES
- VERSION
- parentView
- uuid
Events
$
Alias for jQuery
A
Ember.NativeArray
Creates an Ember.NativeArray from an Array like object.
Does not modify the original object.
Returns:
K
Object
private
Empty function. Useful for some operations.
Returns:
- Object
addListener
(obj, eventName, targetOrMethod, method, once)
Add an event listener
Parameters:
- obj
- eventName String
- targetOrMethod Object|Function
- A target object or a function
- method Function|String
- A function or the name of a function to be called on `target`
- once Boolean
- A flag whether a function should only be called once
alias
(methodName)
Ember.Descriptor
deprecated
Makes a property or method available via an additional name.
1 2 3 4 5 6 7 8 9 10 11 12 |
App.PaintSample = Ember.Object.extend({
color: 'red',
colour: Ember.alias('color'),
name: function(){
return "Zed";
},
moniker: Ember.alias("name")
});
var paintSample = App.PaintSample.create()
paintSample.get('colour'); // 'red'
paintSample.moniker(); // 'Zed'
|
Parameters:
- methodName String
- name of the method or property to alias
Returns:
aliasMethod
(methodName)
Ember.Descriptor
Makes a method available via an additional name.
1 2 3 4 5 6 7 8 |
App.Person = Ember.Object.extend({
name: function(){
return 'Tomhuda Katzdale';
},
moniker: Ember.aliasMethod('name')
});
var goodGuy = App.Person.create()
|
Parameters:
- methodName String
- name of the method to alias
Returns:
assert
(desc, test)
Define an assertion that will throw an exception if the condition is not
met. Ember build tools will remove any calls to Ember.assert() when
doing a production build. Example:
1 2 3 4 |
// Test for truthiness Ember.assert('Must pass a valid object', obj); // Fail unconditionally Ember.assert('This code path should never be run') |
Parameters:
- desc String
- A description of the assertion. This will become the text of the Error thrown if the assertion fails.
- test Boolean
- Must be truthy for the assertion to pass. If falsy, an exception will be thrown.
beginPropertyChanges
bind
(obj, to, from)
Ember.Binding
Global helper method to create a new binding. Just pass the root object
along with a to and from path to create and connect the binding.
Parameters:
Returns:
- Ember.Binding
- binding instance
cacheFor
(obj, key)
*
Returns the cached value for a property, if one exists. This can be useful for peeking at the value of a computed property that is generated lazily, without accidentally causing it to be created.
Parameters:
- obj Object
- the object whose property you want to check
- key String
- the name of the property whose cached value you want to return
Returns:
- *
- the cached value
canInvoke
(obj, methodName)
Checks to see if the methodName exists on the obj.
Parameters:
- obj Object
- The object to check for the method
- methodName String
- The method name to check for
changePropertiess
(callback, binding)
Make a series of property changes together in an exception-safe way.
1 2 3 4 |
Ember.changeProperties(function() { obj1.set('foo', mayBlowUpWhenSet); obj2.set('bar', baz); }); |
Parameters:
- callback Function
- binding
compare
(v, w)
Number
This will compare two javascript values of possibly different types. It will tell you which one is greater than the other by returning:
- -1 if the first is smaller than the second,
- 0 if both are equal,
- 1 if the first is greater than the second.
The order is calculated based on Ember.ORDER_DEFINITION, if types are different.
In case they have the same type an appropriate comparison for this type is made.
1 2 3 |
Ember.compare('hello', 'hello'); // 0 Ember.compare('abc', 'dfg'); // -1 Ember.compare(2, 1); // 1 |
Parameters:
- v Object
- First value to compare
- w Object
- Second value to compare
Returns:
- Number
- -1 if v < w, 0 if v = w and 1 if v > w.
computed
(func)
Ember.ComputedProperty
This helper returns a new property descriptor that wraps the passed
computed property function. You can use this helper to define properties
with mixins or via Ember.defineProperty().
The function you pass will be used to both get and set property values. The function should accept two parameters, key and value. If value is not undefined you should set the value first. In either case return the current value of the property.
Parameters:
- func Function
- The computed property function.
Returns:
- Ember.ComputedProperty
- property descriptor instance
computed.alias
(dependentKey)
Ember.ComputedProperty
Parameters:
- dependentKey String
Returns:
- Ember.ComputedProperty
- computed property which creates an alias to the original value for property.
computed.and
(dependentKey,)
Ember.ComputedProperty
Parameters:
- dependentKey, String
- [dependentKey...]
Returns:
- Ember.ComputedProperty
- computed property which peforms a logical `and` on the values of all the original values for properties.
computed.any
(dependentKey,)
Ember.ComputedProperty
Parameters:
- dependentKey, String
- [dependentKey...]
Returns:
- Ember.ComputedProperty
- computed property which returns the first trouthy value of given list of properties.
computed.bool
(dependentKey)
Ember.ComputedProperty
Parameters:
- dependentKey String
Returns:
- Ember.ComputedProperty
- computed property which convert to boolean the original value for property
computed.defaultTo
(defaultPath)
Ember.ComputedProperty
Parameters:
- defaultPath String
Returns:
- Ember.ComputedProperty
- computed property which acts like a standard getter and setter, but defaults to the value from `defaultPath`.
computed.empty
(dependentKey)
Ember.ComputedProperty
Parameters:
- dependentKey String
Returns:
- Ember.ComputedProperty
- computed property which negate the original value for property
computed.equal
(dependentKey, value)
Ember.ComputedProperty
Parameters:
- dependentKey String
- value String|Number|Object
Returns:
- Ember.ComputedProperty
- computed property which returns true if the original value for property is equal to the given value.
computed.gt
(dependentKey, value)
Ember.ComputedProperty
Parameters:
- dependentKey String
- value Number
Returns:
- Ember.ComputedProperty
- computed property which returns true if the original value for property is greater then given value.
computed.gte
(dependentKey, value)
Ember.ComputedProperty
Parameters:
- dependentKey String
- value Number
Returns:
- Ember.ComputedProperty
- computed property which returns true if the original value for property is greater or equal then given value.
computed.lt
(dependentKey, value)
Ember.ComputedProperty
Parameters:
- dependentKey String
- value Number
Returns:
- Ember.ComputedProperty
- computed property which returns true if the original value for property is less then given value.
computed.lte
(dependentKey, value)
Ember.ComputedProperty
Parameters:
- dependentKey String
- value Number
Returns:
- Ember.ComputedProperty
- computed property which returns true if the original value for property is less or equal then given value.
computed.map
(dependentKey,)
Ember.ComputedProperty
Parameters:
- dependentKey, String
- [dependentKey...]
Returns:
- Ember.ComputedProperty
- computed property which maps values of all passed properties in to an array.
computed.match
(dependentKey, regexp)
Ember.ComputedProperty
Parameters:
- dependentKey String
- regexp RegExp
Returns:
- Ember.ComputedProperty
- computed property which match the original value for property against a given RegExp
computed.none
(dependentKey)
Ember.ComputedProperty
Parameters:
- dependentKey String
Returns:
- Ember.ComputedProperty
- computed property which rturns true if original value for property is null or undefined.
computed.not
(dependentKey)
Ember.ComputedProperty
Parameters:
- dependentKey String
Returns:
- Ember.ComputedProperty
- computed property which returns inverse of the original value for property
computed.notEmpty
(dependentKey)
Ember.ComputedProperty
Parameters:
- dependentKey String
Returns:
- Ember.ComputedProperty
- computed property which returns true if original value for property is not empty.
computed.or
(dependentKey,)
Ember.ComputedProperty
Parameters:
- dependentKey, String
- [dependentKey...]
Returns:
- Ember.ComputedProperty
- computed property which peforms a logical `or` on the values of all the original values for properties.
copy
(obj, deep)
Object
Creates a clone of the passed object. This function can take just about any type of object and create a clone of it, including primitive values (which are not actually cloned because they are immutable).
If the passed object implements the clone() method, then this function
will simply call that method and return the result.
Parameters:
- obj Object
- The object to clone
- deep Boolean
- If true, a deep copy of the object is made
Returns:
- Object
- The cloned object
create
Identical to Object.create(). Implements if not available natively.
debug
(message)
Display a debug notice. Ember build tools will remove any calls to
Ember.debug() when doing a production build.
1 |
Ember.debug("I'm a debug notice!");
|
Parameters:
- message String
- A debug message to display.
defineProperty
(obj, keyName, desc, data)
private
Parameters:
- obj Object
- the object to define this property on. This may be a prototype.
- keyName String
- the name of the property
- desc Ember.Descriptor
- an instance of `Ember.Descriptor` (typically a computed property) or an ES5 descriptor. You must provide this or `data` but not both.
- data *
- something other than a descriptor, that will become the explicit value of this property.
deprecate
(message, test)
Display a deprecation warning with the provided message and a stack trace
(Chrome and Firefox only). Ember build tools will remove any calls to
Ember.deprecate() when doing a production build.
Parameters:
- message String
- A description of the deprecation.
- test Boolean
- An optional boolean. If falsy, the deprecation will be displayed.
deprecateFunc
(message, func)
Function
Display a deprecation warning with the provided message and a stack trace (Chrome and Firefox only) when the wrapped method is called.
Ember build tools will not remove calls to Ember.deprecateFunc(), though
no warnings will be shown in production.
Parameters:
Returns:
- Function
- a new function that wrapped the original function with a deprecation warning
destroy
(obj)
Void
Tears down the meta on an object so that it can be garbage collected. Multiple calls will have no effect.
Parameters:
- obj Object
- the object to destroy
Returns:
- Void
endPropertyChanges
generateGuid
(obj, prefix)
String
private
Parameters:
- obj Object
- Object the guid will be used for. If passed in, the guid will be saved on the object and reused whenever you pass the same object again. If no object is passed, just generate a new guid.
- prefix String
- Prefix to place in front of the guid. Useful when you want to separate the guid into separate namespaces.
Returns:
- String
- the guid
get
(obj, keyName)
Object
Gets the value of a property on an object. If the property is computed,
the function will be invoked. If the property is not defined but the
object implements the unknownProperty method then that will be invoked.
If you plan to run on IE8 and older browsers then you should use this method anytime you want to retrieve a property on an object that you don't know for sure is private. (Properties beginning with an underscore '_' are considered private.)
On all newer browsers, you only need to use this method to retrieve
properties if the property might not be defined on the object and you want
to respect the unknownProperty handler. Otherwise you can ignore this
method.
Note that if the object itself is undefined, this method will throw
an error.
Parameters:
- obj Object
- The object to retrieve from.
- keyName String
- The property key to retrieve
Returns:
- Object
- the property value or `null`.
guidFor
(obj)
String
private
Parameters:
- obj Object
- any object, string, number, Element, or primitive
Returns:
- String
- the unique guid for this instance.
immediateObserver
(func, propertyNames)
Returns:
- func
inspect
(obj)
String
Convenience method to inspect an object. This method will attempt to convert the object into a useful string description.
It is a pretty simple implementation. If you want something more robust, use something like JSDump: https://github.com/NV/jsDump
Parameters:
- obj Object
- The object you want to inspect.
Returns:
- String
- A description of the object
isArray
(obj)
Boolean
Returns true if the passed object is an array or Array-like.
Ember Array Protocol:
- the object has an objectAt property
- the object is a native Array
- the object is an Object, and has a length property
Unlike Ember.typeOf this method returns true even if the passed object is
not formally array but appears to be array-like (i.e. implements Ember.Array)
1 2 3 |
Ember.isArray(); // false Ember.isArray([]); // true Ember.isArray( Ember.ArrayProxy.create({ content: [] }) ); // true |
Parameters:
- obj Object
- The object to test
Returns:
- Boolean
- true if the passed object is an array or Array-like
isEmpty
(obj)
Boolean
Verifies that a value is null or an empty string, empty array,
or empty function.
Constrains the rules on Ember.isNone by returning false for empty
string and empty arrays.
1 2 3 4 5 6 7 |
Ember.isEmpty(); // true Ember.isEmpty(null); // true Ember.isEmpty(undefined); // true Ember.isEmpty(''); // true Ember.isEmpty([]); // true Ember.isEmpty('Adam Hawkins'); // false Ember.isEmpty([0,1,2]); // false |
Parameters:
- obj Object
- Value to test
Returns:
- Boolean
isEqual
(a, b)
Boolean
Compares two objects, returning true if they are logically equal. This is
a deeper comparison than a simple triple equal. For sets it will compare the
internal objects. For any other object that implements isEqual() it will
respect that method.
1 2 3 |
Ember.isEqual('hello', 'hello'); // true Ember.isEqual(1, 2); // false Ember.isEqual([4,2], [4,2]); // false |
Parameters:
- a Object
- first object to compare
- b Object
- second object to compare
Returns:
- Boolean
isGlobalPath
(path)
private
Returns true if the provided path is global (e.g., MyApp.fooController.bar)
instead of local (foo.bar.baz).
Parameters:
- path String
Returns:
- Boolean
isNone
(obj)
Boolean
Returns true if the passed value is null or undefined. This avoids errors from JSLint complaining about use of ==, which can be technically confusing.
1 2 3 4 5 6 |
Ember.isNone(); // true Ember.isNone(null); // true Ember.isNone(undefined); // true Ember.isNone(''); // false Ember.isNone([]); // false Ember.isNone(function(){}); // false |
Parameters:
- obj Object
- Value to test
Returns:
- Boolean
keys
(obj)
Array
Returns all of the keys defined on an object or hash. This is useful
when inspecting objects for debugging. On browsers that support it, this
uses the native Object.keys implementation.
Parameters:
- obj Object
Returns:
- Array
- Array containing keys of obj
makeArray
(obj)
Array
Forces the passed object to be part of an array. If the object is already
an array or array-like, returns the object. Otherwise adds the object to
an array. If obj is null or undefined, returns an empty array.
1 2 3 4 5 6 7 8 |
Ember.makeArray(); // [] Ember.makeArray(null); // [] Ember.makeArray(undefined); // [] Ember.makeArray('lindsay'); // ['lindsay'] Ember.makeArray([1,2,42]); // [1,2,42] var controller = Ember.ArrayProxy.create({ content: [] }); Ember.makeArray(controller) === controller; // true |
Parameters:
- obj Object
- the object
Returns:
- Array
meta
(obj, writable)
Object
private
Retrieves the meta hash for an object. If writable is true ensures the
hash is writable for this object as well.
The meta object contains information about computed property descriptors as well as any watched properties and other information. You generally will not access this information directly but instead work with higher level methods that manipulate this hash indirectly.
Parameters:
- obj Object
- The object to retrieve meta for
- writable Boolean
- Pass `false` if you do not intend to modify the meta hash, allowing the method to avoid making an unnecessary copy.
Returns:
- Object
- the meta hash for an object
metaPath
(obj, path, writable)
private
Parameters:
- obj Object
- The object whose meta we are examining
- path Array
- An array of keys to walk down
- writable Boolean
- whether or not to create a new meta (or meta property) if one does not already exist or if it's shared with its constructor
mixin
(obj, mixins)
Parameters:
- obj
- mixins
Returns:
- obj
normalizeTuple
(target, path)
Array
private
Parameters:
- target Object
- The current target. May be `null`.
- path String
- A path on the target or a global property path.
Returns:
- Array
- a temporary array with the normalized target/path pair.
onLoad
(name, callback)
propertyDidChange
(obj, keyName)
Void
This function is called just after an object property has changed. It will notify any observers and clear caches among other things.
Normally you will not need to call this method directly but if for some
reason you can't directly watch a property you can invoke this method
manually along with Ember.propertyWilLChange() which you should call just
before the property value changes.
Parameters:
- obj Object
- The object with the property that will change
- keyName String
- The property key (or path) that will change.
Returns:
- Void
propertyWillChange
(obj, keyName)
Void
This function is called just before an object property is about to change. It will notify any before observers and prepare caches among other things.
Normally you will not need to call this method directly but if for some
reason you can't directly watch a property you can invoke this method
manually along with Ember.propertyDidChange() which you should call just
after the property value changes.
Parameters:
- obj Object
- The object with the property that will change
- keyName String
- The property key (or path) that will change.
Returns:
- Void
removeListener
(obj, eventName, targetOrMethod, method)
Remove an event listener
Arguments should match those passed to {{#crossLink "Ember/addListener"}}{{/crossLink}}
Parameters:
- obj
- eventName String
- targetOrMethod Object|Function
- A target object or a function
- method Function|String
- A function or the name of a function to be called on `target`
renderToBuffer
(buffer)
private
Parameters:
- buffer Ember.RenderBuffer
- the render buffer. If no buffer is passed, a default buffer, using the current view's `tagName`, will be used.
required
Denotes a required property for a mixin
rewatch
(obj)
private
Parameters:
- obj
runLoadHooks
(name, object)
Parameters:
- name String
- name of hook
- object Object
- object to pass to callbacks
sendEvent
(obj, eventName, params, actions)
Parameters:
- obj
- eventName String
- params Array
- actions Array
Returns:
- true
set
(obj, keyName, value)
Object
Sets the value of a property on an object, respecting computed properties
and notifying observers and other listeners of the change. If the
property is not defined but the object implements the unknownProperty
method then that will be invoked as well.
If you plan to run on IE8 and older browsers then you should use this method anytime you want to set a property on an object that you don't know for sure is private. (Properties beginning with an underscore '_' are considered private.)
On all newer browsers, you only need to use this method to set
properties if the property might not be defined on the object and you want
to respect the unknownProperty handler. Otherwise you can ignore this
method.
Parameters:
- obj Object
- The object to modify.
- keyName String
- The property key to set
- value Object
- The value to set
Returns:
- Object
- the passed value.
setProperties
(target, properties)
Set a list of properties on an object. These properties are set inside
a single beginPropertyChanges and endPropertyChanges batch, so
observers will be buffered.
Parameters:
- target
- properties Hash
Returns:
- target
suspendListener
(obj, eventName, targetOrMethod, method, callback)
private
Parameters:
- obj
- eventName Array
- Array of event names
- targetOrMethod Object|Function
- A target object or a function
- method Function|String
- A function or the name of a function to be called on `target`
- callback Function
tryCatchFinally
(tryable, catchable, finalizer, binding)
*
Provides try { } catch finally { } functionality, while working around Safari's double finally bug.
Parameters:
Returns:
- *
- The return value is the that of the finalizer, unless that value is undefined, in which case it is the return value of the tryable.
tryFinally
(tryable, finalizer, binding)
*
Provides try { } finally { } functionality, while working around Safari's double finally bug.
Parameters:
Returns:
- *
- The return value is the that of the finalizer, unless that valueis undefined, in which case it is the return value of the tryable
tryInvoke
(obj, methodName, args)
*
Checks to see if the methodName exists on the obj,
and if it does, invokes it with the arguments passed.
Parameters:
- obj Object
- The object to check for the method
- methodName String
- The method name to check for
- args Array
- The arguments to pass to the method
Returns:
- *
- the return value of the invoked method or undefined if it cannot be invoked
trySet
(obj, path, value)
Error-tolerant form of Ember.set. Will not blow up if any part of the
chain is undefined, null, or destroyed.
This is primarily used when syncing bindings, which may try to update after an object has been destroyed.
Parameters:
- obj Object
- The object to modify.
- path String
- The property path to set
- value Object
- The value to set
typeOf
(item)
String
Returns a consistent type for the passed item.
Use this instead of the built-in typeof to get the type of an item.
It will return the same result across all browsers and includes a bit
more detail. Here is what will be returned:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
| Return Value | Meaning | |---------------|------------------------------------------------------| | 'string' | String primitive | | 'number' | Number primitive | | 'boolean' | Boolean primitive | | 'null' | Null value | | 'undefined' | Undefined value | | 'function' | A function | | 'array' | An instance of Array | | 'class' | An Ember class (created using Ember.Object.extend()) | | 'instance' | An Ember object instance | | 'error' | An instance of the Error object | | 'object' | A JavaScript object not inheriting from Ember.Object | |
Examples:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Ember.typeOf(); // 'undefined' Ember.typeOf(null); // 'null' Ember.typeOf(undefined); // 'undefined' Ember.typeOf('michael'); // 'string' Ember.typeOf(101); // 'number' Ember.typeOf(true); // 'boolean' Ember.typeOf(Ember.makeArray); // 'function' Ember.typeOf([1,2,90]); // 'array' Ember.typeOf(Ember.Object.extend()); // 'class' Ember.typeOf(Ember.Object.create()); // 'instance' Ember.typeOf(new Error('teamocil')); // 'error' // "normal" JavaScript object Ember.typeOf({a: 'b'}); // 'object' |
Parameters:
- item Object
- the item to check
Returns:
- String
- the type
warn
(message, test)
Display a warning with the provided message. Ember build tools will
remove any calls to Ember.warn() when doing a production build.
Parameters:
- message String
- A warning to display.
- test Boolean
- An optional boolean. If falsy, the warning will be displayed.
watchedEvents
(obj)
private
Parameters:
- obj
ENV
Hash
Standard environmental variables. You can define these in a global ENV
variable before loading Ember to control various configuration
settings.
EXTEND_PROTOTYPES
Boolean
Determines whether Ember should enhances some built-in object prototypes to
provide a more friendly API. If enabled, a few methods will be added to
Function, String, and Array. Object.prototype will not be enhanced,
which is the one that causes most trouble for people.
In general we recommend leaving this option set to true since it rarely
conflicts with other code. If you need to turn it off however, you can
define an ENV.EXTEND_PROTOTYPES config to disable it.
Default: true
LOG_BINDINGS
Boolean
Debug parameter you can turn on. This will log all bindings that fire to the console. This should be disabled in production code. Note that you can also enable this from the console or temporarily.
Default: false
LOG_STACKTRACE_ON_DEPRECATION
Boolean
Determines whether Ember logs a full stack trace during deprecation warnings
Default: true
LOG_VERSION
Boolean
Determines whether Ember logs info about version of used libraries
Default: true
META_KEY
String
private
constant
The key used to store meta information on object for property observing.
SHIM_ES5
Boolean
Determines whether Ember should add ECMAScript 5 shims to older browsers.
Default: Ember.EXTEND_PROTOTYPES
STRINGS
Hash
Defines the hash of localized strings for the current language. Used by
the Ember.String.loc() helper. To localize, add string values to this
hash.
TEMPLATES
Hash
Global hash of shared templates. This will automatically be populated by the build tools so that you can store your Handlebars templates in separate files that get loaded into JavaScript at buildtime.
parentView
Ember.View
If the view is currently inserted into the DOM of a parent view, this property will point to the parent of the view.
Default: null
uuid
Number
private
Previously we used Ember.$.uuid, however $.uuid has been removed from
jQuery master. We'll just bootstrap our own uuid now.
onerror
(error)
A function may be assigned to Ember.onerror to be called when Ember
internals encounter an error. This is useful for specialized error handling
and reporting code.
Parameters:
- error Exception
- the error object
Fork Us!