view orange/serialization/SerializationException.d @ 26:78e5fef4bbf2 experimental

Third step in refactoring the API. Stating to add unit tests.
author Jacob Carlborg <doob@me.com>
date Tue, 19 Oct 2010 10:22:10 +0200
parents 99c52d46822a
children
line wrap: on
line source

/**
 * Copyright: Copyright (c) 2010 Jacob Carlborg.
 * Authors: Jacob Carlborg
 * Version: Initial created: Jan 30, 2010
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
 */
module orange.serialization.SerializationException;

import orange.core.string;

version (Tango)
	alias Exception ExceptionBase;

else
	alias Throwable ExceptionBase;

class SerializationException : ExceptionBase
{	
	this (string message)
	{
		super(message);
	}
	
	this (string message, string file, long line)
	{
		version (Tango)
			super(message, file, line);
		
		else
			super(message);
	}
	
	version (Tango)
	{
		this (ExceptionBase exception)
		{
			super(exception.msg, exception.file, exception.line, exception.next, exception.info);
		}
	}
	
	else
	{
		this (ExceptionBase exception)
		{
			super(exception.msg, exception.file, exception.line);
		}
	}
}