PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TException

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 TException::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.

Exception
Extended by TException

Direct known subclasses

TApplicationException, TInvalidCallbackException, TRpcException, TSqlMapException, TSystemException

Indirect known subclasses

TActiveRecordConfigurationException, TActiveRecordException, TIOException, TNotSupportedException, TPhpErrorException, TRpcClientRequestException, TRpcClientResponseException, TSqlMapConfigurationException, TSqlMapDuplicateException, TSqlMapExecutionException, TSqlMapUndefinedException, TTemplateException, TConfigurationException, TDbConnectionException, TDbException, THttpException, TInvalidDataTypeException, TInvalidDataValueException, TInvalidOperationException, TInvalidPropertyException
Package: System\Exceptions
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Exceptions/TException.php
Methods summary
public
# __construct( string $errorMessage )

Constructor.

Constructor.

Parameters

$errorMessage
string
error message. This can be a string that is listed in the message file. If so, the message in the preferred language will be used as the error message. Any rest parameters will be used to replace placeholders ({0}, {1}, {2}, etc.) in the message.

Overrides

Exception::__construct()
protected string
# translateErrorMessage( string $key )

Translates an error code into an error message.

Translates an error code into an error message.

Parameters

$key
string
error code that is passed in the exception constructor.

Returns

string
the translated error message
protected string
# getErrorMessageFile( )

Returns

string
path to the error message file
public string
# getErrorCode( )

Returns

string
error code
public
# setErrorCode( string $code )

Parameters

$code
string
error code
public string
# getErrorMessage( )

Returns

string
error message
protected
# setErrorMessage( string $message )

Parameters

$message
string
error message
Methods inherited from Exception
__toString(), getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString()
Properties summary
public static array $_messageCache array()
#
Properties inherited from Exception
$code, $file, $line, $message
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO