better error message
This commit is contained in:
parent
ca101cf094
commit
dc7d081608
|
@ -1,7 +1,9 @@
|
|||
try:
|
||||
from tiramisu3 import Config
|
||||
from tiramisu3.error import ValueOptionError
|
||||
except:
|
||||
from tiramisu import Config
|
||||
from tiramisu.error import ValueOptionError
|
||||
from traceback import print_exc
|
||||
from copy import copy
|
||||
from typing import Dict, Callable, List, Optional
|
||||
|
@ -259,6 +261,8 @@ class Dispatcher(register.RegisterDispatcher,
|
|||
if get_config()['global']['debug']:
|
||||
print_exc()
|
||||
raise ValueError(_(f'unknown parameter in "{uri}": "{key}"'))
|
||||
except ValueOptionError as err:
|
||||
raise ValueError(_(f'invalid parameter in "{uri}": {err}'))
|
||||
else:
|
||||
extra_parameters[key] = value
|
||||
# check mandatories options
|
||||
|
|
Loading…
Reference in New Issue