@safe/nothrow changes (by John Colvin)

This commit is contained in:
Kiith-Sa 2012-12-27 20:56:15 +01:00
parent b6ecb80f4b
commit 6018fc49ea
6 changed files with 9 additions and 9 deletions

View file

@ -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);

View file

@ -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();

View file

@ -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
{

View file

@ -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);
}

View file

@ -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;

View file

@ -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;