- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml
Classes:
TApplicationException
TConfigurationException
TDbConnectionException
TDbException
TErrorHandler
TException
THttpException
TInvalidDataTypeException
TInvalidDataValueException
TInvalidOperationException
TIOException
TNotSupportedException
TPhpErrorException
TSystemException
TTemplateException

Keyword

# Class TException

    Exception
       |
       --TException

#### Direct Known Sub-classes:

TInvalidCallbackException , TSqlMapException , TSystemException , TApplicationException

TException class

TException is the base class for all PRADO exceptions.

TException provides the functionality of translating an error code into a descriptive error message in a language that is preferred by user browser. Additional parameters may be passed together with the error code so that the translated message contains more detailed information.

By default, TException looks for a message file by calling getErrorMessageFile() method, which uses the "message-xx.txt" file located under "System.Exceptions" folder, where "xx" is the code of the user preferred language. If such a file is not found, "message.txt" will be used instead.

Since: 3.0
Author: Qiang Xue <qiang.xue@gmail.com>

Constructor Summary
public | __construct Array Constructor.

Method Summary
string | getErrorCode ()
string | getErrorMessage ()
protected string | getErrorMessageFile ()
void | setErrorCode ( string $code)
protected void | setErrorMessage ( string $message)
protected string | translateErrorMessage ( string $key) Translates an error code into an error message.

Constructor Details

## __construct

public __construct | Array

Constructor.

Method Details

## getErrorCode

public string getErrorCode | ()

Output
string | error code
Exception

## getErrorMessage

public string getErrorMessage | ()

Output
string | error message
Exception

## getErrorMessageFile

protected string getErrorMessageFile | ()

Output
string | path to the error message file
Exception

## setErrorCode

public void setErrorCode | (string $code )

Input
string | $code | error code
Output
Exception

## setErrorMessage

protected void setErrorMessage | (string $message )

Input
string | $message | error message
Output
Exception

## translateErrorMessage

protected string translateErrorMessage | (string $key )

Translates an error code into an error message.

Input
string | $key | error code that is passed in the exception constructor.
Output
string | the translated error message
Exception