diff --git a/dyaml/constructor.d b/dyaml/constructor.d index f087b59..986795d 100644 --- a/dyaml/constructor.d +++ b/dyaml/constructor.d @@ -46,7 +46,7 @@ package class ConstructorException : YAMLException * end = End position of the error context. */ this(string msg, Mark start, Mark end, string file = __FILE__, int line = __LINE__) - @safe nothrow + @safe { super(msg ~ "\nstart: " ~ start.toString() ~ "\nend: " ~ end.toString(), file, line); diff --git a/dyaml/dumper.d b/dyaml/dumper.d index 9b404b9..7126fcf 100644 --- a/dyaml/dumper.d +++ b/dyaml/dumper.d @@ -167,7 +167,7 @@ struct Dumper } ///Construct a Dumper writing to a _stream. This is useful to e.g. write to memory. - this(Stream stream) pure @safe nothrow + this(Stream stream) pure @safe { resolver_ = new Resolver(); representer_ = new Representer(); diff --git a/dyaml/emitter.d b/dyaml/emitter.d index 5751193..70178a2 100644 --- a/dyaml/emitter.d +++ b/dyaml/emitter.d @@ -166,7 +166,7 @@ struct Emitter * lineBreak = Line break character/s. */ this(Stream stream, const bool canonical, const int indent, const int width, - const LineBreak lineBreak) @trusted nothrow + const LineBreak lineBreak) @trusted in{assert(stream.writeable, "Can't emit YAML to a non-writable stream");} body { diff --git a/dyaml/exception.d b/dyaml/exception.d index ddca5af..2421ccf 100644 --- a/dyaml/exception.d +++ b/dyaml/exception.d @@ -58,7 +58,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 nothrow + string file = __FILE__, int line = __LINE__) @safe { const msg = context ~ '\n' ~ (contextMark != problemMark ? contextMark.toString() ~ '\n' : "") ~ @@ -68,7 +68,7 @@ abstract class MarkedYAMLException : YAMLException //Construct a MarkedYAMLException with specified problem. this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__) - @safe nothrow + @safe { super(problem ~ '\n' ~ problemMark.toString(), file, line); } @@ -89,14 +89,14 @@ template MarkedExceptionCtors() { public: this(string context, Mark contextMark, string problem, Mark problemMark, - string file = __FILE__, int line = __LINE__) @safe nothrow + string file = __FILE__, int line = __LINE__) @safe { super(context, contextMark, problem, problemMark, file, line); } this(string problem, Mark problemMark, string file = __FILE__, int line = __LINE__) - @safe nothrow + @safe { super(problem, problemMark, file, line); } diff --git a/dyaml/parser.d b/dyaml/parser.d index 9d531dc..126a312 100644 --- a/dyaml/parser.d +++ b/dyaml/parser.d @@ -135,7 +135,7 @@ final class Parser public: ///Construct a Parser using specified Scanner. - this(Scanner scanner) @trusted nothrow + this(Scanner scanner) @trusted { state_ = &parseStreamStart; scanner_ = scanner; diff --git a/dyaml/scanner.d b/dyaml/scanner.d index acaedb3..2482619 100644 --- a/dyaml/scanner.d +++ b/dyaml/scanner.d @@ -152,7 +152,7 @@ final class Scanner public: ///Construct a Scanner using specified Reader. - this(Reader reader) @trusted nothrow + this(Reader reader) @trusted { //Return the next token, but do not delete it from the queue reader_ = reader;