| 1450 | | # check for user's layout for errors |
| 1451 | | if(TRAX_ENV == "development" && file_exists(Trax::$layouts_path."/trax_error.".Trax::$views_extension)) { |
| 1452 | | include(Trax::$layouts_path."/trax_error.".Trax::$views_extension); |
| 1453 | | } elseif(TRAX_ENV == "development" && file_exists(TRAX_LIB_ROOT."/templates/error.phtml")) { |
| 1454 | | # use default layout for errors |
| 1455 | | include(TRAX_LIB_ROOT."/templates/error.phtml"); |
| 1456 | | } elseif(TRAX_ENV == "development") { |
| 1457 | | echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; |
| 1458 | | echo "<h1>$error_heading</h1>\n"; |
| 1459 | | echo "<p>$error_message</p>\n"; |
| 1460 | | if($trace) { |
| 1461 | | echo "<pre style=\"background-color: #eee;padding:10px;font-size: 11px;\">"; |
| 1462 | | echo "<code>$trace</code></pre>\n"; |
| | 1450 | # check for user's layout for errors |
| | 1451 | if(TRAX_ENV == "development" || Trax::$show_trax_errors) { |
| | 1452 | if(file_exists(Trax::$layouts_path."/trax_error.".Trax::$views_extension)) { |
| | 1453 | include(Trax::$layouts_path."/trax_error.".Trax::$views_extension); |
| | 1454 | } elseif(file_exists(TRAX_LIB_ROOT."/templates/error.phtml")) { |
| | 1455 | # use default layout for errors |
| | 1456 | include(TRAX_LIB_ROOT."/templates/error.phtml"); |
| | 1457 | } else { |
| | 1458 | echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; |
| | 1459 | echo "<h1>$error_heading</h1>\n"; |
| | 1460 | echo "<p>$error_message</p>\n"; |
| | 1461 | if($trace) { |
| | 1462 | echo "<pre style=\"background-color: #eee;padding:10px;font-size: 11px;\">"; |
| | 1463 | echo "<code>$trace</code></pre>\n"; |
| | 1464 | } |
| | 1465 | echo "</font>\n"; |