| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* An exception that should probably not be handled by the display code, fCore::enableExceptionHandler() is recommended |
| 5 |
* |
| 6 |
* @copyright Copyright (c) 2007-2011 Will Bond |
| 7 |
* @author Will Bond [wb] <will@flourishlib.com> |
| 8 |
* @license http://flourishlib.com/license |
| 9 |
* |
| 10 |
* @package Flourish |
| 11 |
* @link http://flourishlib.com/fUnexpectedException |
| 12 |
* |
| 13 |
* @version 1.0.0b2 |
| 14 |
* @changes 1.0.0b2 Updated ::printMessage() to use an ASCII dash to prevent encoding issues when an output encoding is not specified [wb, 2011-05-09] |
| 15 |
* @changes 1.0.0b The initial implementation [wb, 2007-06-14] |
| 16 |
*/ |
| 17 |
class fUnexpectedException extends fException { |
| 18 |
|
| 19 |
/** |
| 20 |
* Prints out a generic error message inside of a `div` with the class being `'exception {exception_class_name}'` |
| 21 |
* |
| 22 |
* @return void |
| 23 |
*/ |
| 24 |
public function printMessage() { |
| 25 |
echo '<div class="exception ' . $this->getCSSClass() . '"><p>'; |
| 26 |
echo self::compose( |
| 27 |
'It appears an error has occurred - we apologize for the inconvenience. The problem may be resolved if you try again.' |
| 28 |
); |
| 29 |
echo '</p></div>'; |
| 30 |
} |
| 31 |
|
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* Copyright (c) 2007-2011 Will Bond <will@flourishlib.com> |
| 36 |
* |
| 37 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
| 38 |
* of this software and associated documentation files (the "Software"), to deal |
| 39 |
* in the Software without restriction, including without limitation the rights |
| 40 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 41 |
* copies of the Software, and to permit persons to whom the Software is |
| 42 |
* furnished to do so, subject to the following conditions: |
| 43 |
* |
| 44 |
* The above copyright notice and this permission notice shall be included in |
| 45 |
* all copies or substantial portions of the Software. |
| 46 |
* |
| 47 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 48 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 49 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 50 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 51 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 52 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 53 |
* THE SOFTWARE. |
| 54 |
*/ |