Ignore:
Timestamp:
Apr 28, 2010, 6:11:07 PM (15 years ago)
Author:
plg
Message:

bug 860: display a more readable error when the _data directory is not writable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r5924 r5985  
    362362 * @param string msg a message to display
    363363 */
    364 function fatal_error($msg)
    365 {
     364function fatal_error($msg, $title=null, $show_trace=true)
     365{
     366  if (empty($title))
     367  {
     368    $title = 'Piwigo encountered a non recoverable error';
     369  }
     370 
    366371  $btrace_msg = '';
    367   if (function_exists('debug_backtrace'))
     372  if ($show_trace and function_exists('debug_backtrace'))
    368373  {
    369374    $bt = debug_backtrace();
     
    378383
    379384  $display = "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
    380 <h1>Piwigo encountered a non recoverable error</h1>
     385<h1>$title</h1>
    381386<pre style='font-size:larger;background:white;color:red;padding:1em;margin:0;clear:both;display:block;width:auto;height:auto;overflow:auto'>
    382387<b>$msg</b>
Note: See TracChangeset for help on using the changeset viewer.