Changeset 5995
- Timestamp:
- 02/03/12 12:19:37 (4 months ago)
- File:
-
- 1 edited
-
trunk/core/exception.core.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/exception.core.php
r5872 r5995 102 102 * @var string HTML Representation of the Exception Template 103 103 */ 104 private static $exception_template _content= '';104 private static $exception_template = ''; 105 105 106 106 /** 107 107 * @var string HTML Representation of the Exception Development (RAD) Template 108 108 */ 109 private static $exception_dev elopment_template_content= '';109 private static $exception_dev_template = ''; 110 110 111 111 /** … … 138 138 } 139 139 140 /** 141 * @todo 142 * 1. catch Smarty "Template Syntax" Errors 143 * 2. provide link to templateeditor (file:line) to fix the error 144 */ 145 #$smartyError = (false !== stristr($this->message, 'Syntax Error in template')) ? true : false; 146 147 /** 148 * @todo 149 * 1. catch Smarty "Unable to load template file" Errors 150 * 2. provide link to templatefilemanager (module:file) 151 */ 152 140 153 echo $this->yellowScreenOfDeath(); 141 }142 143 /**144 * Method for Conditional Usage (Shortcut/Convenience Method)145 *146 * @example147 * Usage: someFunction() OR throwException();148 *149 * @param string $message Exception Message150 * @param int $code Exception Code151 */152 public function throwException($message = null, $code = null)153 {154 throw new Clansuite_Exception($message, $code);155 154 } 156 155 … … 195 194 if(is_file($exception_template_file) === true) 196 195 { 197 self::$exception_template _content= file_get_contents($exception_template_file);196 self::$exception_template = file_get_contents($exception_template_file); 198 197 } 199 198 } … … 222 221 { 223 222 $content = file_get_contents($exception_template_file); 224 self::$exception_dev elopment_template_content= $content;223 self::$exception_dev_template = $content; 225 224 define('RAPIDDEVTPL', true); 226 225 } … … 228 227 else 229 228 { 230 # propose to create a new rapid development template 231 # link to templateditor 229 # @todo propose to create a new rapid development template via tpleditor 232 230 } 233 231 */ … … 241 239 private static function getExceptionDevelopmentTemplate($placeholders) 242 240 { 243 $original_file_content = self::$exception_dev elopment_template_content;241 $original_file_content = self::$exception_dev_template; 244 242 $replaced_content = ''; 245 243 … … 307 305 # Panel 1 - Exception Message and File 308 306 $errormessage .= '<div id="panel"'; 309 $errormessage .= 'style="background: none repeat scroll 0 0 #FDF599; border: 1px dotted red; padding: 0 10px 10px;">';307 $errormessage .= 'style="background: none repeat scroll 0 0 #FDF599; border: 1px solid #E03937; border-radius: 3px; padding: 0 10px 10px;">'; 310 308 $errormessage .= '<h3>Exception '.$code.'</h3><h4>'.$this->message.'</h4>'; 311 309 $errormessage .= '<strong>File: </strong>'.dirname($this->file).DS; … … 350 348 351 349 # HEADING <Additional Information> 352 if(empty(self::$exception_template _content) === false)350 if(empty(self::$exception_template) === false) 353 351 { 354 352 $errormessage .= '<tr><td colspan="2"><h3>Additional Information & Solution Suggestion</h3></td></tr>'; 355 $errormessage .= '<tr><td colspan="2">'.self::$exception_template _content.'</td></tr>';353 $errormessage .= '<tr><td colspan="2">'.self::$exception_template.'</td></tr>'; 356 354 357 355 # Split
Note: See TracChangeset
for help on using the changeset viewer.
