Exception ctor purity.
This commit is contained in:
parent
c772609e13
commit
3a4d1e7627
|
@ -21,7 +21,7 @@ class YAMLException : Exception
|
|||
{
|
||||
///Construct a YAMLException with specified message and position where it was thrown.
|
||||
public this(string msg, string file = __FILE__, int line = __LINE__)
|
||||
@trusted nothrow
|
||||
@trusted pure nothrow
|
||||
{
|
||||
super(msg, file, line);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ abstract class MarkedYAMLException : YAMLException
|
|||
{
|
||||
//Construct a MarkedYAMLException with specified context and problem.
|
||||
this(string context, Mark contextMark, string problem, Mark problemMark,
|
||||
string file = __FILE__, int line = __LINE__) @safe
|
||||
string file = __FILE__, int line = __LINE__) @safe pure
|
||||
{
|
||||
const msg = context ~ '\n' ~
|
||||
(contextMark != problemMark ? contextMark.toString() ~ '\n' : "") ~
|
||||
|
@ -71,7 +71,7 @@ abstract class MarkedYAMLException : YAMLException
|
|||
|
||||
//Construct a MarkedYAMLException with specified problem.
|
||||
this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__)
|
||||
@safe
|
||||
@safe pure
|
||||
{
|
||||
super(problem ~ '\n' ~ problemMark.toString(), file, line);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ package:
|
|||
class ReaderException : YAMLException
|
||||
{
|
||||
this(string msg, string file = __FILE__, int line = __LINE__)
|
||||
@safe nothrow
|
||||
@safe pure nothrow
|
||||
{
|
||||
super("Error reading stream: " ~ msg, file, line);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue