Documentation automatically generated from the source-code using phpDocumentor.
Official Homepage: xao-php.sourceforge.net
XAO
Official homepage | API home | class tree: XAO | index: XAO | all elements

Class: Exceptions

Source Location: Program_Root/XAO_Exceptions.php

Class Exceptions

Class Overview

Utility for managing massages relating to exceptional conditions (errors)

This class is used to produce and manage error messages for exceptional conditions as XML data in a DomDoc based object. It also stores debugging data wich may optionally be displayed by an appropriate stylesheet. All data is managed directly on the DOM tree (rather than maintaining a dedicated stack) of the calling object to ensure it's availability without having to notify a separate stack manager when the application needs the data. As such, this class requires a stub (node) on the DOM tree represending the "errors" element where it will mainatain error data.

Located in Program_Root/XAO_Exceptions.php [line 46]

XaoRoot
   |
   --Exceptions
Author(s):
  • Terence Kearns
Information Tags:
Link:  http://xao-php.sourceforge.net
License:  LGPL
Copyright:  Terence Kearns 2003
Version:  0.0

Properties

Methods

[ Top ]
Property Summary
array   $arrErrAttribs   Hash list of metadata to provide supportive context for error messages
mixed   $blnCreateStackTrace  
mixed   $ndErrors  
mixed   $objDoc  
string   $strElName   XML Namespace Prefix

[ Top ]
Method Summary
void   Exceptions()   Exceptions constructor
node   &ndCreateError()   Execution method for created the actual error data
void   SetMessage()   Exceptional message setter method
void   SetMsgAttribs()   Exceptional message setter method
node   _CreateStackTrace()   Method for creating verbose stack trace data on DOM tree

[ Top ]
Properties
array   $arrErrAttribs = array() [line 71]

Hash list of metadata to provide supportive context for error messages

This is intended to be used by methods that override $this->Throw().

API Tags:
Access:  public


[ Top ]
mixed   $blnCreateStackTrace = true [line 51]

[ Top ]
mixed   $ndErrors [line 49]

[ Top ]
mixed   $objDoc [line 48]

[ Top ]
string   $strElName [line 61]

XML Namespace Prefix

Element name to use for each exception.

API Tags:
Access:  public


[ Top ]
Methods
Constructor Exceptions  [line 84]

  void Exceptions( dom &$objDoc, node &$ndErrors, [mixed $strElName = "exception"], [mixed $idNamespace = ""]  )

Exceptions constructor

Simply obtain references to the calling document and keep them locally (global to the class).

Parameters:
dom   &$objDoc:  ref document where the error data is to be grafted.
node   &$ndErrors:  ref the stub onto which the error grafted

API Tags:
Access:  public


[ Top ]
ndCreateError  [line 147]

  node &ndCreateError( )

Execution method for created the actual error data


API Tags:
Return:  A reference to the new DOM node created.
Access:  public


[ Top ]
SetMessage  [line 102]

  void SetMessage( string $strMsg  )

Exceptional message setter method

Parameters:
string   $strMsg:  current message for current exceptional condition

API Tags:
Access:  public


[ Top ]
SetMsgAttribs  [line 124]

  void SetMsgAttribs( array $arrAttribs  )

Exceptional message setter method

This method resets the current array of error message attributes to the associative array passed in the first argument. The array is NOT appended.

Parameters:
array   $arrAttribs:  copy associative array of error message attributes

API Tags:
Access:  public


[ Top ]
_CreateStackTrace  [line 182]

  node _CreateStackTrace( mixed &$ndErr  )

Method for creating verbose stack trace data on DOM tree


API Tags:
Return:  A reference to the error DOM node.
Access:  public


[ Top ]

Documentation generated on Tue, 23 Sep 2003 18:34:02 +1000 by phpDocumentor 1.2.2