Amanu
Projektmanagement für Selbstständige und Freelancer
amaException Class Reference

Public Member Functions

 __construct (Exception $e=NULL, $code=NULL, $message=NULL, $languagestring=NULL)
 
 renderScripttag ()
 
 renderJSONerror ()
 
 getJSON ()
 
 setHeaders ($dontdie=false)
 

Private Member Functions

 getData ()
 

Detailed Description

This error takes an Exception and processes it, allows JSON exception output

This file is part of the project codename "AMANUENSIS"

Author
Sebastian Antosch s.ant.nosp@m.osch.nosp@m.@i-sa.nosp@m.n.de

Constructor & Destructor Documentation

__construct ( Exception  $e = NULL,
  $code = NULL,
  $message = NULL,
  $languagestring = NULL 
)

When the Error is constructed, it will process the exception

Parameters
Exception$e- an Exception that shall be processed, optional if $message and $code are given
int$code- an error code, can override the one from the exception
string$message- an Error Message, can override the one from the exception

Member Function Documentation

renderScripttag ( )

Renders the Errordata in a script tag for index.php output

renderJSONerror ( )

Renders an API Response with the error

Returns
string - a json object containing an error
getJSON ( )

Gets the json enocdet data of the error

Returns
string - JSON representation of the error
getData ( )
private

Gets an array containing the data

Returns
array - the object representationg the error
setHeaders (   $dontdie = false)

Sets HTTP error headers

Parameters
boolean$dontdie- most of the time we want to finish after an error. If we don't, pass true

The documentation for this class was generated from the following file: