summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/error.c b/error.c
index 0562de5d84..84286cfcec 100644
--- a/error.c
+++ b/error.c
@@ -1729,6 +1729,19 @@ Init_Exception(void)
}
void
+rb_enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
+{
+ va_list args;
+ VALUE mesg;
+
+ va_start(args, fmt);
+ mesg = rb_enc_vsprintf(enc, fmt, args);
+ va_end(args);
+
+ rb_exc_raise(rb_exc_new3(exc, mesg));
+}
+
+void
rb_raise(VALUE exc, const char *fmt, ...)
{
va_list args;