root/fUnexpectedException.php
Class Resources
| Revision 448, 2.0 kB (checked in by wbond, 2 years ago) |
|---|
| Line | Hide Line Numbers |
|---|---|
| 1 | |
| 2 | /** |
| 3 | * An exception that should probably not be handled by the display code, fCore::enableExceptionHandler() is recommended |
| 4 | * |
| 5 | * @copyright Copyright (c) 2007-2008 Will Bond |
| 6 | * @author Will Bond [wb] <will@flourishlib.com> |
| 7 | * @license http://flourishlib.com/license |
| 8 | * |
| 9 | * @package Flourish |
| 10 | * @link http://flourishlib.com/fUnexpectedException |
| 11 | * |
| 12 | * @version 1.0.0b |
| 13 | * @changes 1.0.0b The initial implementation [wb, 2007-06-14] |
| 14 | */ |
| 15 | class fUnexpectedException extends fException |
| 16 | { |
| 17 | /** |
| 18 | * Prints out a generic error message inside of a `div` with the class being `'exception {exception_class_name}'` |
| 19 | * |
| 20 | * @return void |
| 21 | */ |
| 22 | public function printMessage() |
| 23 | { |
| 24 | echo '<div class="exception ' . $this->getCSSClass() . '"><p>'; |
| 25 | echo self::compose( |
| 26 | 'It appears an error has occured — we apologize for the inconvenience. The problem may be resolved if you try again.' |
| 27 | ); |
| 28 | echo '</p></div>'; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | |
| 33 | |
| 34 | /** |
| 35 | * Copyright (c) 2007-2008 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 | */ |
