Commit 7dc542b3 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Exception classesn: initial creation, very basic

parent beeadcad
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 1/1/16
* Time: 12:43 PM
*/
namespace qfq\exceptions;
/**
* Class UserException
*
* Thrown by Form or FormElement on User errors
*
* @package qfq\exceptions
*/
class CodeException extends \Exception {
/*
* @return string HTML formatted error string
*/
public function formatMessage() {
$message = '<table border="1">';
$message .= '<tr bgcolor="#dddddd"><td>Action</td><td>Code Exception</td></tr>' ;
$message .= '<tr bgcolor="#dddddd"><td>File</td><td>'. $this->getFile(). '</td></tr>' ;
$message .= '<tr bgcolor="#dddddd"><td>Line</td><td>'. $this->getLine(). '</td></tr>' ;
$message .= '<tr bgcolor="#dddddd"><td>Message</td><td>'. $this->getMessage(). '</td></tr>' ;
$message .= '<tr bgcolor="#dddddd"><td>Code</td><td>'. $this->getCode(). '</td></tr>' ;
$message .= '<tr bgcolor="#dddddd"><td>Stackrace</td><td>'. $this->getTraceAsString(). '</td></tr>' ;
$message .= '</table>';
return($message);
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 1/1/16
* Time: 12:43 PM
*/
namespace qfq\exceptions;
/**
* Class UserException
*
* Thrown by Form or FormElement on User errors
*
* @package qfq\exceptions
*/
class UserException extends \Exception {
/*
* @return string HTML formatted error string
*/
public function formatMessage() {
$message = '<div style="border: 1px black solid">';
$message .= $this->getMessage();
$message .= '</div>';
return($message);
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment