standadize errors and add to cleanup
This commit is contained in:
parent
a5eaa40fc6
commit
c81fbc889b
@ -8,7 +8,7 @@
|
|||||||
// we will then have $client and $repo available
|
// we will then have $client and $repo available
|
||||||
require('setup.php');
|
require('setup.php');
|
||||||
|
|
||||||
$words=['Today!!','Overdue!!'];
|
$words=['Today!!','Overdue!!','Error!!'];
|
||||||
|
|
||||||
// loop through the issues
|
// loop through the issues
|
||||||
// we use getIssues() here rather than forIssues() (see https://git.jhodges.co.uk/jhodges/GiteaBot/issues/1)
|
// we use getIssues() here rather than forIssues() (see https://git.jhodges.co.uk/jhodges/GiteaBot/issues/1)
|
||||||
|
@ -44,12 +44,12 @@ foreach($issues as $issue){
|
|||||||
try{
|
try{
|
||||||
$rrule = new RRule($rruletxt);
|
$rrule = new RRule($rruletxt);
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
$result="Error in RRULE\n```plain\n".$e->getMessage()."\n\n$rruletxt\n```\n";
|
$result="Error!!\n\n```plain\n".$e->getMessage()."\n\n$rruletxt\n```\n";
|
||||||
$issue->addComment($result);
|
$issue->addComment($result);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}else{ //couldn't extract, report error
|
}else{ //couldn't extract, report error
|
||||||
$issue->addComment("Can't extract RRULE:");
|
$issue->addComment("Error!!\n\nCan't extract RRULE:");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user