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