Exception: Magick::ImageMagickError
- Inherits:
-
StandardError
- Object
- StandardError
- Magick::ImageMagickError
- Defined in:
- ext/RMagick/rmmain.c
Instance Method Summary collapse
-
#initialize(*args) ⇒ Object
constructor
Initialize a new ImageMagickError object - store the “loc” string in the @magick_location instance variable.
Constructor Details
#initialize(*args) ⇒ Object
Initialize a new ImageMagickError object - store the “loc” string in the @magick_location instance variable.
Ruby usage:
- @verbatim ImageMagickError#initialize(msg) @endverbatim
- @verbatim ImageMagickError#initialize(msg, loc) @endverbatim
Notes:
- Default loc is nil
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 |
# File 'ext/RMagick/rmutil.c', line 827
VALUE
ImageMagickError_initialize(int argc, VALUE *argv, VALUE self)
{
VALUE super_argv[1] = {(VALUE)0};
int super_argc = 0;
VALUE extra = Qnil;
switch(argc)
{
case 2:
extra = argv[1];
case 1:
super_argv[0] = argv[0];
super_argc = 1;
case 0:
break;
default:
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 2)", argc);
}
(void) rb_call_super(super_argc, (const VALUE *)super_argv);
(void) rb_iv_set(self, "@"MAGICK_LOC, extra);
RB_GC_GUARD(extra);
return self;
}
|