Sha256: 37ff896f6594fe403ba982f67f267a84e146544822990ea592e65547b59a9a2e

Contents?: true

Size: 1.67 KB

Versions: 9

Compression:

Stored size: 1.67 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


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

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


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

	void type_error            (const char* file, int line, const char* format = NULL, ...);

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

	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);

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

	void invalid_object_error  (const char* file, int line, const char* format = NULL, ...);

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

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

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


}// Rucy


#endif//EOH

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rucy-0.1.15 include/rucy/exception.h
rucy-0.1.14 include/rucy/exception.h
rucy-0.1.13 include/rucy/exception.h
rucy-0.1.12 include/rucy/exception.h
rucy-0.1.11 include/rucy/exception.h
rucy-0.1.10 include/rucy/exception.h
rucy-0.1.9 include/rucy/exception.h
rucy-0.1.8 include/rucy/exception.h
rucy-0.1.7 include/rucy/exception.h