@@ -1118,13 +1118,13 @@ void Image::draw_line(ssize_t x0, ssize_t y0, ssize_t x1, ssize_t y1,
1118
1118
if (steep) {
1119
1119
try {
1120
1120
this ->write_pixel (y, x, r, g, b, a);
1121
- } catch (const runtime_error & e) {
1121
+ } catch (const out_of_range & e) {
1122
1122
return ;
1123
1123
}
1124
1124
} else {
1125
1125
try {
1126
1126
this ->write_pixel (x, y, r, g, b, a);
1127
- } catch (const runtime_error & e) {
1127
+ } catch (const out_of_range & e) {
1128
1128
return ;
1129
1129
}
1130
1130
}
@@ -1152,7 +1152,7 @@ void Image::draw_horizontal_line(ssize_t x1, ssize_t x2, ssize_t y,
1152
1152
}
1153
1153
try {
1154
1154
this ->write_pixel (x, y, r, g, b, a);
1155
- } catch (const runtime_error & e) {
1155
+ } catch (const out_of_range & e) {
1156
1156
break ;
1157
1157
}
1158
1158
}
@@ -1172,7 +1172,7 @@ void Image::draw_vertical_line(ssize_t x, ssize_t y1, ssize_t y2,
1172
1172
}
1173
1173
try {
1174
1174
this ->write_pixel (x, y, r, g, b, a);
1175
- } catch (const runtime_error & e) {
1175
+ } catch (const out_of_range & e) {
1176
1176
break ;
1177
1177
}
1178
1178
}
@@ -1223,7 +1223,7 @@ void Image::draw_text_v(ssize_t x, ssize_t y, ssize_t* width, ssize_t* height,
1223
1223
}
1224
1224
try {
1225
1225
this ->write_pixel (x_pos + xx, y_pos + yy, r, g, b, a);
1226
- } catch (const runtime_error & e) {
1226
+ } catch (const out_of_range & e) {
1227
1227
}
1228
1228
}
1229
1229
}
@@ -1338,7 +1338,7 @@ void Image::fill_rect(ssize_t x, ssize_t y, ssize_t w, ssize_t h, uint64_t r,
1338
1338
for (ssize_t xx = 0 ; xx < w; xx++) {
1339
1339
try {
1340
1340
this ->write_pixel (x + xx, y + yy, r, g, b, a);
1341
- } catch (const runtime_error & e) {
1341
+ } catch (const out_of_range & e) {
1342
1342
}
1343
1343
}
1344
1344
}
@@ -1353,7 +1353,7 @@ void Image::fill_rect(ssize_t x, ssize_t y, ssize_t w, ssize_t h, uint64_t r,
1353
1353
_b = (a * (uint32_t )b + (0xFF - a) * (uint32_t )_b) / 0xFF ;
1354
1354
_a = (a * (uint32_t )a + (0xFF - a) * (uint32_t )_a) / 0xFF ;
1355
1355
this ->write_pixel (x + xx, y + yy, _r, _g, _b, _a);
1356
- } catch (const runtime_error & e) {
1356
+ } catch (const out_of_range & e) {
1357
1357
}
1358
1358
}
1359
1359
}
0 commit comments