mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Make registry.Regexp.error mimic registry.Value.error
Regexp.error can't directly call Value.error because it's providing extra
information, so it needs to build the InvalidRegistryValue exception itself
and raise it.
Closes: Sf#2985241
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit ef8bd817e8
)
This commit is contained in:
parent
be9128b3ec
commit
fa199022e1
@ -539,7 +539,10 @@ class Regexp(Value):
|
|||||||
self.__parent.__init__(*args, **kwargs)
|
self.__parent.__init__(*args, **kwargs)
|
||||||
|
|
||||||
def error(self, e):
|
def error(self, e):
|
||||||
self.__parent.error('Value must be a regexp of the form %s' % e)
|
s = 'Value must be a regexp of the form m/.../ or /.../. %s' % e
|
||||||
|
e = InvalidRegistryValue(s)
|
||||||
|
e.value = self
|
||||||
|
raise e
|
||||||
|
|
||||||
def set(self, s):
|
def set(self, s):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user