refactor exceptions

This commit is contained in:
DavidBadura
2015-04-06 21:13:02 +00:00
parent ec8ab39e7c
commit 0ab45fae1f
11 changed files with 189 additions and 88 deletions

View File

@@ -3,6 +3,7 @@
namespace DavidBadura\Taskwarrior;
use Carbon\Carbon;
use DavidBadura\Taskwarrior\Exception\DatetimeParseException;
use JMS\Serializer\Annotation as JMS;
/**
@@ -381,7 +382,7 @@ class Task
/**
* @param string|\DateTime|null $date
* @return \DateTime|null
* @throws TaskwarriorException
* @throws DatetimeParseException
*/
private function parseDateTime($date)
{
@@ -404,7 +405,7 @@ class Task
return null;
}
throw new TaskwarriorException();
throw new DatetimeParseException($date);
}
/**