Replace the generic exception class with a more specific one.

This commit is contained in:
Aditya Toshniwal
2020-08-07 12:37:00 +05:30
committed by Akshay Joshi
parent 68a5027d15
commit d6400bbcae
18 changed files with 46 additions and 34 deletions

View File

@@ -204,8 +204,8 @@ class BatchProcess(object):
if self.stime is not None:
if self.etime is None:
raise Exception(_('The process has already been started.'))
raise Exception(
raise RuntimeError(_('The process has already been started.'))
raise RuntimeError(
_('The process has already finished and cannot be restarted.')
)