More readable error throws in Loader.
This commit is contained in:
parent
ddd89c22d5
commit
626337f6ed
|
@ -167,8 +167,8 @@ struct Loader
|
||||||
}
|
}
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to open stream " ~ name_ ~
|
throw new YAMLException("Unable to open stream %s for YAML loading: %s"
|
||||||
" for YAML loading: " ~ e.msg);
|
.format(name_, e.msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,16 +189,16 @@ struct Loader
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reader_ = new Reader(cast(ubyte[])yamlData);
|
reader_ = new Reader(cast(ubyte[])yamlData);
|
||||||
scanner_ = new Scanner(reader_);
|
scanner_ = new Scanner(reader_);
|
||||||
parser_ = new Parser(scanner_);
|
parser_ = new Parser(scanner_);
|
||||||
resolver_ = new Resolver();
|
resolver_ = new Resolver();
|
||||||
constructor_ = new Constructor();
|
constructor_ = new Constructor();
|
||||||
}
|
}
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to open " ~ name_ ~
|
throw new YAMLException("Unable to open %s for YAML loading: %s"
|
||||||
" for YAML loading: " ~ e.msg);
|
.format(name_, e.msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,8 +254,8 @@ struct Loader
|
||||||
}
|
}
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to load YAML from stream " ~
|
throw new YAMLException("Unable to load YAML from %s : %s"
|
||||||
name_ ~ " : " ~ e.msg);
|
.format(name_, e.msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,8 +312,8 @@ struct Loader
|
||||||
}
|
}
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to load YAML from stream " ~
|
throw new YAMLException("Unable to load YAML from %s : %s "
|
||||||
name_ ~ " : " ~ e.msg);
|
.format(name_, e.msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,8 +352,8 @@ struct Loader
|
||||||
}
|
}
|
||||||
catch(YAMLException e)
|
catch(YAMLException e)
|
||||||
{
|
{
|
||||||
throw new YAMLException("Unable to parse YAML from stream " ~
|
throw new YAMLException("Unable to parse YAML from stream %s : %s "
|
||||||
name_ ~ " : " ~ e.msg);
|
.format(name_, e.msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue