Commits

Wei Cheng Pan committed 5e437f3

Move exceptions to core.

Comments (0)

Files changed (19)

Krapture/core/include/xTitan/Exception/BasicError.hpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#ifndef XTITAN_ERROR_BASICERROR_HPP
+#define XTITAN_ERROR_BASICERROR_HPP
+
+#include <exception>
+#include <memory>
+
+#include <QtCore/QString>
+
+#include "xTitan/Utility/CoreConfig.hpp"
+
+
+namespace xtitan {
+
+class XTITAN_CORE_DLL BasicError: public std::exception {
+public:
+	explicit BasicError( const char * message );
+	explicit BasicError( const wchar_t * message );
+	explicit BasicError( const std::string & message );
+	explicit BasicError( const std::wstring & message );
+	explicit BasicError( const QString & message );
+	virtual ~BasicError() throw();
+
+	const QString & getMessage() const;
+	virtual const char * what() const throw();
+
+private:
+	class Private;
+	std::shared_ptr< Private > p_;
+};
+
+}
+
+#endif

Krapture/core/include/xTitan/Exception/IOError.hpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#ifndef KRAPTURE_ERROR_IOERROR_HPP
+#define KRAPTURE_ERROR_IOERROR_HPP
+
+#include "xTitan/Exception/BasicError.hpp"
+
+
+namespace xtitan {
+
+class XTITAN_CORE_DLL IOError: public BasicError {
+public:
+	explicit IOError( const char * message );
+	explicit IOError( const wchar_t * message );
+	explicit IOError( const std::string & message );
+	explicit IOError( const std::wstring & message );
+	explicit IOError( const QString & message );
+};
+
+}
+
+#endif

Krapture/core/include/xTitan/Exception/InternalError.hpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#ifndef KRAPTURE_ERROR_INTERNALERROR_HPP
+#define KRAPTURE_ERROR_INTERNALERROR_HPP
+
+#include "xTitan/Exception/BasicError.hpp"
+
+
+namespace xtitan {
+
+class XTITAN_CORE_DLL InternalError: public BasicError {
+public:
+	explicit InternalError( const char * message );
+	explicit InternalError( const wchar_t * message );
+	explicit InternalError( const std::string & message );
+	explicit InternalError( const std::wstring & message );
+	explicit InternalError( const QString & message );
+};
+
+}
+
+#endif

Krapture/core/src/Exception/BasicError.cpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#include "BasicError_p.hpp"
+
+
+using xtitan::BasicError;
+
+
+/**
+ * @class krapture::error::BasicError
+ * @brief Basic error class
+ * @note This class is an immutable class, the copy behavior is shallow copy.
+ */
+
+BasicError::Private::Private( const QString & m ): message( m ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ *
+ * @p message should encode to UTF-8.
+ */
+BasicError::BasicError( const char * message ): std::exception(), p_( new Private( QString::fromUtf8( message ) ) ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+BasicError::BasicError( const wchar_t * message ): std::exception(), p_( new Private( QString::fromWCharArray( message ) ) ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ *
+ * @p message should encode to UTF-8
+ */
+BasicError::BasicError( const std::string & message ): std::exception(), p_( new Private( QString::fromStdString( message ) ) ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+BasicError::BasicError( const std::wstring & message ): std::exception(), p_( new Private( QString::fromStdWString( message ) ) ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+BasicError::BasicError( const QString & message ): std::exception(), p_( new Private( message ) ) {
+}
+
+/**
+ * @brief Destructor
+ */
+BasicError::~BasicError() throw() {
+}
+
+/**
+ * @brief Get error message
+ * @return error message
+ * @sa what()
+ *
+ * This version returns Unicode error message.
+ */
+const QString & BasicError::getMessage() const {
+	return this->p_->message;
+}
+
+/**
+ * @brief Get error message
+ * @return error message
+ * @sa getMessage()
+ *
+ * This version is provided for compability. The error message is encoded to
+ * system locale.
+ */
+const char * BasicError::what() const throw() {
+	return this->p_->message.toLocal8Bit();
+}

Krapture/core/src/Exception/BasicError_p.hpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#ifndef KRAPTURE_ERROR_BASICERRORPRIVATE_HPP
+#define KRAPTURE_ERROR_BASICERRORPRIVATE_HPP
+
+#include "xTitan/Exception/BasicError.hpp"
+
+
+namespace xtitan {
+
+class BasicError::Private {
+public:
+	explicit Private( const QString & );
+
+	QString message;
+};
+
+}
+
+#endif

Krapture/core/src/Exception/IOError.cpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#include "xTitan/Exception/IOError.hpp"
+
+
+using xtitan::IOError;
+
+
+/**
+ * @class krapture::error::IOError
+ * @brief I/O error class
+ *
+ * This exception throws when an input or output operation has failed.
+ * e.g. File not found, write error ... etc.
+ */
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ *
+ * @p message should encode to UTF-8.
+ */
+IOError::IOError( const char * message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+IOError::IOError( const wchar_t * message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ *
+ * @p message should encode to UTF-8
+ */
+IOError::IOError( const std::string & message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+IOError::IOError( const std::wstring & message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+IOError::IOError( const QString & message ): BasicError( message ) {
+}

Krapture/core/src/Exception/InternalError.cpp

+/*
+Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+#include "xTitan/Exception/InternalError.hpp"
+
+
+using xtitan::InternalError;
+
+
+/**
+ * @class krapture::error::InternalError
+ * @brief Internal error class
+ *
+ * This exception throws when something really bad happened.
+ */
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ *
+ * @p message should encode to UTF-8.
+ */
+InternalError::InternalError( const char * message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+InternalError::InternalError( const wchar_t * message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ *
+ * @p message should encode to UTF-8
+ */
+InternalError::InternalError( const std::string & message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+InternalError::InternalError( const std::wstring & message ): BasicError( message ) {
+}
+
+/**
+ * @brief Create exception with @p message
+ * @param [in] message error message
+ */
+InternalError::InternalError( const QString & message ): BasicError( message ) {
+}

Krapture/server/src/Exception/BasicError.cpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#include "BasicError_p.hpp"
-
-
-using xtitan::BasicError;
-
-
-/**
- * @class krapture::error::BasicError
- * @brief Basic error class
- * @note This class is an immutable class, the copy behavior is shallow copy.
- */
-
-BasicError::Private::Private( const QString & m ): message( m ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- *
- * @p message should encode to UTF-8.
- */
-BasicError::BasicError( const char * message ): std::exception(), p_( new Private( QString::fromUtf8( message ) ) ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-BasicError::BasicError( const wchar_t * message ): std::exception(), p_( new Private( QString::fromWCharArray( message ) ) ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- *
- * @p message should encode to UTF-8
- */
-BasicError::BasicError( const std::string & message ): std::exception(), p_( new Private( QString::fromStdString( message ) ) ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-BasicError::BasicError( const std::wstring & message ): std::exception(), p_( new Private( QString::fromStdWString( message ) ) ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-BasicError::BasicError( const QString & message ): std::exception(), p_( new Private( message ) ) {
-}
-
-/**
- * @brief Destructor
- */
-BasicError::~BasicError() throw() {
-}
-
-/**
- * @brief Get error message
- * @return error message
- * @sa what()
- *
- * This version returns Unicode error message.
- */
-const QString & BasicError::getMessage() const {
-	return this->p_->message;
-}
-
-/**
- * @brief Get error message
- * @return error message
- * @sa getMessage()
- *
- * This version is provided for compability. The error message is encoded to
- * system locale.
- */
-const char * BasicError::what() const throw() {
-	return this->p_->message.toLocal8Bit();
-}

Krapture/server/src/Exception/BasicError.hpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#ifndef XTITAN_ERROR_BASICERROR_HPP
-#define XTITAN_ERROR_BASICERROR_HPP
-
-#include <exception>
-#include <memory>
-
-#include <QtCore/QString>
-
-
-namespace xtitan {
-
-class BasicError: public std::exception {
-public:
-	explicit BasicError( const char * message );
-	explicit BasicError( const wchar_t * message );
-	explicit BasicError( const std::string & message );
-	explicit BasicError( const std::wstring & message );
-	explicit BasicError( const QString & message );
-	virtual ~BasicError() throw();
-
-	const QString & getMessage() const;
-	virtual const char * what() const throw();
-
-private:
-	class Private;
-	std::shared_ptr< Private > p_;
-};
-
-}
-
-#endif

Krapture/server/src/Exception/BasicError_p.hpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#ifndef KRAPTURE_ERROR_BASICERRORPRIVATE_HPP
-#define KRAPTURE_ERROR_BASICERRORPRIVATE_HPP
-
-#include "BasicError.hpp"
-
-
-namespace xtitan {
-
-class BasicError::Private {
-public:
-	explicit Private( const QString & );
-
-	QString message;
-};
-
-}
-
-#endif

Krapture/server/src/Exception/IOError.cpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#include "IOError.hpp"
-
-
-using xtitan::IOError;
-
-
-/**
- * @class krapture::error::IOError
- * @brief I/O error class
- *
- * This exception throws when an input or output operation has failed.
- * e.g. File not found, write error ... etc.
- */
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- *
- * @p message should encode to UTF-8.
- */
-IOError::IOError( const char * message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-IOError::IOError( const wchar_t * message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- *
- * @p message should encode to UTF-8
- */
-IOError::IOError( const std::string & message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-IOError::IOError( const std::wstring & message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-IOError::IOError( const QString & message ): BasicError( message ) {
-}

Krapture/server/src/Exception/IOError.hpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#ifndef KRAPTURE_ERROR_IOERROR_HPP
-#define KRAPTURE_ERROR_IOERROR_HPP
-
-#include "BasicError.hpp"
-
-namespace xtitan {
-
-class IOError: public BasicError {
-public:
-	explicit IOError( const char * message );
-	explicit IOError( const wchar_t * message );
-	explicit IOError( const std::string & message );
-	explicit IOError( const std::wstring & message );
-	explicit IOError( const QString & message );
-};
-
-}
-
-#endif

Krapture/server/src/Exception/InternalError.cpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#include "InternalError.hpp"
-
-
-using xtitan::InternalError;
-
-
-/**
- * @class krapture::error::InternalError
- * @brief Internal error class
- *
- * This exception throws when something really bad happened.
- */
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- *
- * @p message should encode to UTF-8.
- */
-InternalError::InternalError( const char * message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-InternalError::InternalError( const wchar_t * message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- *
- * @p message should encode to UTF-8
- */
-InternalError::InternalError( const std::string & message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-InternalError::InternalError( const std::wstring & message ): BasicError( message ) {
-}
-
-/**
- * @brief Create exception with @p message
- * @param [in] message error message
- */
-InternalError::InternalError( const QString & message ): BasicError( message ) {
-}

Krapture/server/src/Exception/InternalError.hpp

-/*
-Copyright (c) 2011 Wei Cheng Pan <legnaleurc@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-#ifndef KRAPTURE_ERROR_INTERNALERROR_HPP
-#define KRAPTURE_ERROR_INTERNALERROR_HPP
-
-#include "BasicError.hpp"
-
-
-namespace xtitan {
-
-class InternalError: public BasicError {
-public:
-	explicit InternalError( const char * message );
-	explicit InternalError( const wchar_t * message );
-	explicit InternalError( const std::string & message );
-	explicit InternalError( const std::wstring & message );
-	explicit InternalError( const QString & message );
-};
-
-}
-
-#endif

Krapture/server/src/Exception/SqlError.hpp

 #ifndef KRAPTURE_ERROR_SQLERROR_HPP
 #define KRAPTURE_ERROR_SQLERROR_HPP
 
-#include "IOError.hpp"
+#include "xTitan/Exception/IOError.hpp"
 
 namespace xtitan {
 

Krapture/server/src/Sikuli/SikuliClient.cpp

 #include <QtCore/QTextCodec>
 #include <QtGui/QCursor>
 
-#include "Exception/IOError.hpp"
+#include "xTitan/Exception/IOError.hpp"
 #include "xTitan/Utility/Setting.hpp"
 
 

Krapture/server/src/TestCase/TestCaseManager.cpp

 #include <QtSql/QSqlQuery>
 
 #include "xTitan/Utility/Setting.hpp"
-#include "Exception/InternalError.hpp"
+#include "xTitan/Exception/InternalError.hpp"
 #include "Exception/SqlError.hpp"
 #include "TestCase/TestCase.hpp"
 

Krapture/server/src/Widget/MainWindow.cpp

 #include <QtGui/QImage>
 #include <QtGui/QMessageBox>
 
-#include "Exception/IOError.hpp"
+#include "xTitan/Exception/IOError.hpp"
 #include "xTitan/Utility/Setting.hpp"
 #include "TestCase/TestCaseManager.hpp"
 

Krapture/server/src/Widget/OpeningDialog.cpp

 */
 #include "OpeningDialog_p.hpp"
 
+#include "xTitan/Exception/IOError.hpp"
 #include "TestCase/TestCaseManager.hpp"
-#include "Exception/IOError.hpp"
 
 
 using xtitan::OpeningDialog;