More exception purity.
This commit is contained in:
parent
e0e9082615
commit
06324bd5a4
|
@ -45,7 +45,7 @@ struct Mark
|
|||
}
|
||||
|
||||
///Get a string representation of the mark.
|
||||
string toString() const @trusted
|
||||
string toString() const @trusted pure
|
||||
{
|
||||
//Line/column numbers start at zero internally, make them start at 1.
|
||||
string clamped(ushort v){return str(v + 1) ~ (v == ushort.max ? " or higher" : "");}
|
||||
|
@ -81,7 +81,7 @@ abstract class MarkedYAMLException : YAMLException
|
|||
template ExceptionCtors()
|
||||
{
|
||||
public this(string msg, string file = __FILE__, int line = __LINE__)
|
||||
@safe nothrow
|
||||
@safe pure nothrow
|
||||
{
|
||||
super(msg, file, line);
|
||||
}
|
||||
|
@ -92,14 +92,14 @@ template MarkedExceptionCtors()
|
|||
{
|
||||
public:
|
||||
this(string context, Mark contextMark, string problem, Mark problemMark,
|
||||
string file = __FILE__, int line = __LINE__) @safe
|
||||
string file = __FILE__, int line = __LINE__) @safe pure
|
||||
{
|
||||
super(context, contextMark, problem, problemMark,
|
||||
file, line);
|
||||
}
|
||||
|
||||
this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__)
|
||||
@safe
|
||||
@safe pure
|
||||
{
|
||||
super(problem, problemMark, file, line);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue