#include "rays/ruby/exception.h" #include "defs.h" static Class cRaysError; static Class cOpenGLError; static Class cShaderError; void Init_rays_exception () { Module mRays = rb_define_module("Rays"); cRaysError = rb_define_class_under(mRays, "RaysError", rb_eStandardError); cOpenGLError = rb_define_class_under(mRays, "OpenGLError", cRaysError); cShaderError = rb_define_class_under(mRays, "ShaderError", cOpenGLError); } namespace Rays { Class rays_error_class () { return cRaysError; } Class opengl_error_class () { return cOpenGLError; } Class shader_error_class () { return cShaderError; } }// Rays