diff --git a/source/dyaml/exception.d b/source/dyaml/exception.d index d280dd3..d1ef78c 100644 --- a/source/dyaml/exception.d +++ b/source/dyaml/exception.d @@ -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); } diff --git a/source/dyaml/reader.d b/source/dyaml/reader.d index cdc6b2a..005355d 100644 --- a/source/dyaml/reader.d +++ b/source/dyaml/reader.d @@ -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); }