Merge pull request #186 from Herringway/preserve-exception-source
don't throw away file/line when throwing new YAMLExceptions merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
commit
1448c8fe86
|
@ -225,7 +225,7 @@ struct Dumper(Range)
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to dump YAML to stream "
|
throw new YAMLException("Unable to dump YAML to stream "
|
||||||
~ name_ ~ " : " ~ e.msg);
|
~ name_ ~ " : " ~ e.msg, e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ struct Dumper(Range)
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to emit YAML to stream "
|
throw new YAMLException("Unable to emit YAML to stream "
|
||||||
~ name_ ~ " : " ~ e.msg);
|
~ name_ ~ " : " ~ e.msg, e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct Loader
|
||||||
catch(FileException e)
|
catch(FileException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to open file %s for YAML loading: %s"
|
throw new YAMLException("Unable to open file %s for YAML loading: %s"
|
||||||
.format(filename, e.msg));
|
.format(filename, e.msg), e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// ditto
|
/// ditto
|
||||||
|
@ -208,7 +208,7 @@ struct Loader
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to load YAML from %s : %s"
|
throw new YAMLException("Unable to load YAML from %s : %s"
|
||||||
.format(name_, e.msg));
|
.format(name_, e.msg), e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ struct Loader
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to load YAML from %s : %s "
|
throw new YAMLException("Unable to load YAML from %s : %s "
|
||||||
.format(name_, e.msg));
|
.format(name_, e.msg), e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Scan and return all tokens. Used for debugging.
|
// Scan and return all tokens. Used for debugging.
|
||||||
|
@ -297,7 +297,7 @@ struct Loader
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to scan YAML from stream " ~
|
throw new YAMLException("Unable to scan YAML from stream " ~
|
||||||
name_ ~ " : " ~ e.msg);
|
name_ ~ " : " ~ e.msg, e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ struct Loader
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to scan YAML from stream " ~
|
throw new YAMLException("Unable to scan YAML from stream " ~
|
||||||
name_ ~ " : " ~ e.msg);
|
name_ ~ " : " ~ e.msg, e.file, e.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue