1 /**
2  * Copyright: Copyright (c) 2010-2011 Jacob Carlborg.
3  * Authors: Jacob Carlborg
4  * Version: Initial created: Jan 30, 2010
5  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6  */
7 module mambo.serialization.SerializationException;
8 
9 import mambo.core..string;
10 
11 alias Throwable ExceptionBase;
12 
13 /**
14  * This class represents an exception, it's the base class of all exceptions used
15  * throughout this library.
16  */
17 class SerializationException : ExceptionBase
18 {
19 	/**
20 	 * Creates a new exception with the given message.
21 	 *
22 	 * Params:
23 	 *     message = the message of the exception
24 	 */
25 	this (string message)
26 	{
27 		super(message);
28 	}
29 
30 	/**
31 	 * Creates a new exception with the given message, file and line info.
32 	 *
33 	 * Params:
34 	 *     message = the message of the exception
35 	 *     file = the file where the exception occurred
36 	 *     line = the line in the file where the exception occurred
37 	 */
38 	this (string message, string file, size_t line)
39 	{
40 		super(message, file, line);
41 	}
42 
43 	/**
44 	 * Creates a new exception out of the given exception. Used for wrapping already existing
45 	 * exceptions as SerializationExceptions.
46 	 *
47 	 *
48 	 * Params:
49 	 *     exception = the exception exception to wrap
50 	 */
51 	this (ExceptionBase exception)
52 	{
53 		super(exception.msg, exception.file, exception.line, exception.next);
54 	}
55 }