Sha256: 760bfc24fe148ede572aef4c7b24a213d8ca2aeb9447c75b395c669e6ecaa891

Contents?: true

Size: 1.8 KB

Versions: 30

Compression:

Stored size: 1.8 KB

Contents

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


#include <stdexcept>
#include <xot/exception.h>
#include <rucy/value.h>


namespace Rucy
{


	class RubyException : public std::runtime_error
	{

		typedef std::runtime_error Super;

		public:

			RubyException (Value exception);

			RubyException (Value exception, const char* format, ...);

			const char* what () const throw();

			Value value () const;

		private:

			/*Global*/Value val;

	};// RubyException


	struct RubyJumpTag
	{

		public:

			int tag;

			RubyJumpTag (int tag);

	};// RubyJumpTag


	[[noreturn]]
	void raise (const char* format = NULL, ...);

	[[noreturn]]
	void raise (RubyValue exception, const char* format = NULL, ...);


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

	[[noreturn]]
	void type_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 arg_count_error (
		const char* file, int line,
		const char* method, int nargs, int nargs_expected,
		int n1 = -1, int n2 = -1, int n3 = -1, int n4 = -1, int n5 = -1,
		int n6 = -1, int n7 = -1, int n8 = -1, int n9 = -1, int n10 = -1);

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

	[[noreturn]]
	void invalid_object_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 not_implemented_error (
		const char* file, int line, const char* format = NULL, ...);

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


}// Rucy


#endif//EOH

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rucy-0.3 include/rucy/exception.h
rucy-0.2.1 include/rucy/exception.h
rucy-0.2 include/rucy/exception.h
rucy-0.1.44 include/rucy/exception.h
rucy-0.1.43 include/rucy/exception.h
rucy-0.1.42 include/rucy/exception.h
rucy-0.1.41 include/rucy/exception.h
rucy-0.1.40 include/rucy/exception.h
rucy-0.1.39 include/rucy/exception.h
rucy-0.1.38 include/rucy/exception.h
rucy-0.1.37 include/rucy/exception.h
rucy-0.1.36 include/rucy/exception.h
rucy-0.1.35 include/rucy/exception.h
rucy-0.1.34 include/rucy/exception.h
rucy-0.1.33 include/rucy/exception.h
rucy-0.1.32 include/rucy/exception.h
rucy-0.1.31 include/rucy/exception.h
rucy-0.1.30 include/rucy/exception.h
rucy-0.1.29 include/rucy/exception.h
rucy-0.1.28 include/rucy/exception.h