Skip to content
Snippets Groups Projects
Commit e61ec601 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Better error management

parent 88e39bbb
No related branches found
No related tags found
No related merge requests found
......@@ -753,7 +753,8 @@ class ActionComm
if ($result < 0)
{
$this->error=$langs->trans("ErrorFailedToWriteFile",$outputfile);
$langs->load("errors");
$this->error=$langs->trans("ErrorFailToCreateFile",$outputfile);
}
}
......
......@@ -18,9 +18,9 @@
/**
\file htdocs/lib/xcal.lib.php
\brief Function to manage calendar files (vcal/ical/...)
\version $Id$
* \file htdocs/lib/xcal.lib.php
* \brief Function to manage calendar files (vcal/ical/...)
* \version $Id$
*/
/**
......@@ -211,7 +211,7 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi
}
else
{
dol_syslog("xcal.lib.php::build_cal_file Failed to open file ".$outputfile." for writing");
dol_syslog("xcal.lib.php::build_calfile Failed to open file ".$outputfile." for writing");
return -2;
}
}
......
......@@ -128,6 +128,12 @@ if ($format == 'ical' || $format == 'vcal')
// header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
exit;
}
else
{
print 'Error '.$agenda->error;
exit;
}
}
if ($format == 'rss')
......@@ -159,6 +165,12 @@ if ($format == 'rss')
// header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
exit;
}
else
{
print 'Error '.$agenda->error;
exit;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment