Sha256: cab19c1b36830046638c8bc0c1c90d732e9ffe7382a01d2b6f065a0351141546

Contents?: true

Size: 1.44 KB

Versions: 26

Compression:

Stored size: 1.44 KB

Contents

// -*- c++ -*-
#pragma once
#ifndef __XOT_EXCEPTION_H__
#define __XOT_EXCEPTION_H__


#include <stdexcept>
#include <xot/string.h>


namespace Xot
{


	class XotError : public std::runtime_error
	{
		typedef std::runtime_error Super;
		public: XotError (const char* str = NULL);
	};


	class InvalidStateError : public XotError
	{
		typedef XotError Super;
		public: InvalidStateError (const char* str = NULL);
	};


	class SystemError : public XotError
	{
		typedef XotError Super;
		public: SystemError (const char* str = NULL);
	};


	class NotImplementedError : public XotError
	{
		typedef XotError Super;
		public: NotImplementedError (const char* str = NULL);
	};


	String error_text (const char* file, int line, const char* str);


	namespace ErrorFunctions
	{

		[[noreturn]]
		void xot_error (
			const char* file, int line, const char* format = NULL, ...);

		[[noreturn]]
		void argument_error (
			const char* file, int line, const char* format = NULL, ...);

		[[noreturn]]
		void index_error (
			const char* file, int line, const char* format = NULL, ...);

		[[noreturn]]
		void invalid_state_error (
			const char* file, int line, const char* format = NULL, ...);

		[[noreturn]]
		void system_error (
			const char* file, int line, const char* format = NULL, ...);

		[[noreturn]]
		void not_implemented_error (
			const char* file, int line, const char* format = NULL, ...);

	}// ErrorFunctions


	using namespace ErrorFunctions;


}// Xot


#endif//EOH

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
xot-0.2 include/xot/exception.h
xot-0.1.42 include/xot/exception.h
xot-0.1.41 include/xot/exception.h
xot-0.1.40 include/xot/exception.h
xot-0.1.39 include/xot/exception.h
xot-0.1.38 include/xot/exception.h
xot-0.1.37 include/xot/exception.h
xot-0.1.36 include/xot/exception.h
xot-0.1.35 include/xot/exception.h
xot-0.1.34 include/xot/exception.h
xot-0.1.33 include/xot/exception.h
xot-0.1.32 include/xot/exception.h
xot-0.1.31 include/xot/exception.h
xot-0.1.30 include/xot/exception.h
xot-0.1.29 include/xot/exception.h
xot-0.1.28 include/xot/exception.h
xot-0.1.27 include/xot/exception.h
xot-0.1.26 include/xot/exception.h
xot-0.1.25 include/xot/exception.h
xot-0.1.24 include/xot/exception.h