(AIR only)
Packageflash.errors
Classpublic class SQLError
InheritanceSQLError Inheritance Error Inheritance Object

A SQLError instance provides detailed information about a failed operation.

In asynchronous execution mode, when an error occurs with a SQL database operation the SQLConnection or SQLStatement instance dispatches a SQLErrorEvent object. Information about the error in the form of a SQLError instance can be accessed from the SQLErrorEvent object's error property.

In synchronous execution mode, when an error occurs with a SQL database operation the SQLConnection or SQLStatement instance throws a SQLError exception, which can be handled by enclosing the error-throwing code in a try..catch block.

This class provides properties containing the error details (specifying the specific type of error that occured), a text message containing the details of the error, and the operation that caused the error to occur.

See also

flash.events.SQLErrorEvent
flash.data.SQLConnection
flash.data.SQLStatement


Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  AIR-onlydetails : String
[read-only] Details of the current error.
SQLError
 InheritederrorID : int
[read-only] Contains the reference number associated with the specific error message.
Error
 Inheritedmessage : String
Contains the message associated with the Error object.
Error
 Inheritedname : String
Contains the name of the Error object.
Error
  AIR-onlyoperation : String
[read-only] A value indicating the operation that was being attempted when the error occurred.
SQLError
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
AIR-onlySQLError(operation:String, details:String = "", message:String = "", id:int = 0)
Creates a SQLError instance that can be thrown or used with a SQLErrorEvent instance's error property.
SQLError
 Inherited
Returns the call stack for an error as a string at the time of the error's construction (for the debugger version of Flash Player and the AIR Debug Launcher (ADL) only; returns null if not using the debugger version of Flash Player or the ADL.
Error
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
Returns the string "Error" by default or the value contained in the Error.message property, if defined.
SQLError
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail
AIR-only detailsproperty
details:String  [read-only]

Details of the current error. This provides additional specific information about the error that occurred.


Implementation
    public function get details():String
AIR-only operationproperty 
operation:String  [read-only]

A value indicating the operation that was being attempted when the error occurred. This value is one of the constants defined in the SQLErrorOperation class.


Implementation
    public function get operation():String

See also

Constructor Detail
AIR-only SQLError()Constructor
public function SQLError(operation:String, details:String = "", message:String = "", id:int = 0)

Creates a SQLError instance that can be thrown or used with a SQLErrorEvent instance's error property.

Parameters
operation:String — Indicates the specific operation that caused the failure. The value is one of the constants defined in the SQLErrorOperation class.
 
details:String (default = "") — The details for the current error.
 
message:String (default = "") — The description of the error that occurred.
 
id:int (default = 0) — A reference number associated with the specific error message.

See also

Method Detail
AIR-only toString()method
public function toString():String

Returns the string "Error" by default or the value contained in the Error.message property, if defined.

Returns
String — The error message.