|
1 | 1 | /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2 | 2 | /*
|
3 |
| - Copyright (C) 2009-2016 Kouhei Sutou <kou@clear-code.com> |
| 3 | + Copyright (C) 2009-2025 Sutou Kouhei <kou@clear-code.com> |
4 | 4 | Copyright (C) 2014-2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
5 | 5 |
|
6 | 6 | This library is free software; you can redistribute it and/or
|
@@ -104,6 +104,7 @@ static VALUE eGrnCancel;
|
104 | 104 | static VALUE eGrnWindowFunctionError;
|
105 | 105 | static VALUE eGrnZstdError;
|
106 | 106 | static VALUE eGrnConnectionReset;
|
| 107 | +static VALUE eGrnBloscError; |
107 | 108 |
|
108 | 109 | VALUE
|
109 | 110 | rb_grn_rc_to_exception (grn_rc rc)
|
@@ -357,6 +358,11 @@ rb_grn_rc_to_exception (grn_rc rc)
|
357 | 358 | case GRN_CONNECTION_RESET:
|
358 | 359 | exception = eGrnConnectionReset;
|
359 | 360 | break;
|
| 361 | +#if GRN_VERSION_OR_LATER(13, 0, 8) |
| 362 | + case GRN_BLOSC_ERROR: |
| 363 | + exception = eGrnBloscError; |
| 364 | + break; |
| 365 | +#endif |
360 | 366 | }
|
361 | 367 |
|
362 | 368 | if (NIL_P(exception))
|
@@ -1086,4 +1092,16 @@ rb_grn_init_exception (VALUE mGrn)
|
1086 | 1092 | */
|
1087 | 1093 | eGrnConnectionReset =
|
1088 | 1094 | rb_define_class_under(mGrn, "ConnectionReset", rb_eGrnError);
|
| 1095 | + |
| 1096 | +#if GRN_VERSION_OR_LATER(13, 0, 8) |
| 1097 | + /* |
| 1098 | + * Document-class: Groonga::BloscError |
| 1099 | + * |
| 1100 | + * It is used when Blosc reports an error. |
| 1101 | + * |
| 1102 | + * @since 14.1.2 |
| 1103 | + */ |
| 1104 | + eGrnBloscError = |
| 1105 | + rb_define_class_under(mGrn, "BloscError", rb_eGrnError); |
| 1106 | +#endif |
1089 | 1107 | }
|
0 commit comments