More readable error throws in Loader.

This commit is contained in:
Ferdinand Majerech 2014-07-31 02:16:53 +02:00
parent ddd89c22d5
commit 626337f6ed

View file

@ -167,8 +167,8 @@ struct Loader
}
catch(YAMLException e)
{
throw new YAMLException("Unable to open stream " ~ name_ ~
" for YAML loading: " ~ e.msg);
throw new YAMLException("Unable to open stream %s for YAML loading: %s"
.format(name_, e.msg));
}
}
@ -197,8 +197,8 @@ struct Loader
}
catch(YAMLException e)
{
throw new YAMLException("Unable to open " ~ name_ ~
" for YAML loading: " ~ e.msg);
throw new YAMLException("Unable to open %s for YAML loading: %s"
.format(name_, e.msg));
}
}
@ -254,8 +254,8 @@ struct Loader
}
catch(YAMLException e)
{
throw new YAMLException("Unable to load YAML from stream " ~
name_ ~ " : " ~ e.msg);
throw new YAMLException("Unable to load YAML from %s : %s"
.format(name_, e.msg));
}
}
@ -312,8 +312,8 @@ struct Loader
}
catch(YAMLException e)
{
throw new YAMLException("Unable to load YAML from stream " ~
name_ ~ " : " ~ e.msg);
throw new YAMLException("Unable to load YAML from %s : %s "
.format(name_, e.msg));
}
}
@ -352,8 +352,8 @@ struct Loader
}
catch(YAMLException e)
{
throw new YAMLException("Unable to parse YAML from stream " ~
name_ ~ " : " ~ e.msg);
throw new YAMLException("Unable to parse YAML from stream %s : %s "
.format(name_, e.msg));
}
}
}