This commit is contained in:
Felix Krause 2019-11-30 13:16:40 +01:00
parent e6ac75d86a
commit f8b264f992
1 changed files with 2 additions and 4 deletions

View File

@ -67,7 +67,7 @@ proc constructChild*[T](s: var YamlStream, c: ConstructionContext,
proc constructChild*[O](s: var YamlStream, c: ConstructionContext, proc constructChild*[O](s: var YamlStream, c: ConstructionContext,
result: var ref O) result: var ref O)
{.raises: [YamlStreamError].} {.raises: [YamlConstructionError, YamlStreamError].}
## Constructs an arbitrary Nim value from a part of a YAML stream. ## Constructs an arbitrary Nim value from a part of a YAML stream.
## The stream will advance until after the finishing token that was used ## The stream will advance until after the finishing token that was used
## for constructing the value. The object may be constructed from an alias ## for constructing the value. The object may be constructed from an alias
@ -1248,9 +1248,7 @@ proc constructChild*[O](s: var YamlStream, c: ConstructionContext,
else: internalError("Unexpected event kind: " & $e.kind) else: internalError("Unexpected event kind: " & $e.kind)
s.peek = e s.peek = e
try: constructChild(s, c, result[]) try: constructChild(s, c, result[])
except YamlConstructionError: except YamlConstructionError as e:
var e = newException(YamlStreamError, getCurrentExceptionMsg())
e.parent = getCurrentException()
raise e raise e
except YamlStreamError as e: except YamlStreamError as e:
raise e raise e