@@ -941,7 +941,11 @@ RendererAgg::draw_path(const Py::Tuple& args) {
941
941
if (snap)
942
942
gc.isaa = false ;
943
943
944
- _draw_path (curve, has_clippath, face, gc);
944
+ try {
945
+ _draw_path (curve, has_clippath, face, gc);
946
+ } catch (const char * e) {
947
+ throw Py::RuntimeError (e);
948
+ }
945
949
946
950
return Py::Object ();
947
951
}
@@ -1175,20 +1179,24 @@ RendererAgg::draw_path_collection(const Py::Tuple& args) {
1175
1179
1176
1180
PathListGenerator path_generator (paths);
1177
1181
1178
- _draw_path_collection_generic<PathListGenerator, 1 , 1 >
1179
- (master_transform,
1180
- cliprect,
1181
- clippath,
1182
- clippath_trans,
1183
- path_generator,
1184
- transforms_obj,
1185
- offsets_obj,
1186
- offset_trans,
1187
- facecolors_obj,
1188
- edgecolors_obj,
1189
- linewidths,
1190
- linestyles_obj,
1191
- antialiaseds);
1182
+ try {
1183
+ _draw_path_collection_generic<PathListGenerator, 1 , 1 >
1184
+ (master_transform,
1185
+ cliprect,
1186
+ clippath,
1187
+ clippath_trans,
1188
+ path_generator,
1189
+ transforms_obj,
1190
+ offsets_obj,
1191
+ offset_trans,
1192
+ facecolors_obj,
1193
+ edgecolors_obj,
1194
+ linewidths,
1195
+ linestyles_obj,
1196
+ antialiaseds);
1197
+ } catch (const char *e) {
1198
+ throw Py::RuntimeError (e);
1199
+ }
1192
1200
1193
1201
return Py::Object ();
1194
1202
}
@@ -1310,20 +1318,24 @@ RendererAgg::draw_quad_mesh(const Py::Tuple& args) {
1310
1318
}
1311
1319
1312
1320
try {
1313
- _draw_path_collection_generic<QuadMeshGenerator, 0 , 0 >
1314
- (master_transform,
1315
- cliprect,
1316
- clippath,
1317
- clippath_trans,
1318
- path_generator,
1319
- transforms_obj,
1320
- offsets_obj,
1321
- offset_trans,
1322
- facecolors_obj,
1323
- edgecolors_obj,
1324
- linewidths,
1325
- linestyles_obj,
1326
- antialiaseds);
1321
+ try {
1322
+ _draw_path_collection_generic<QuadMeshGenerator, 0 , 0 >
1323
+ (master_transform,
1324
+ cliprect,
1325
+ clippath,
1326
+ clippath_trans,
1327
+ path_generator,
1328
+ transforms_obj,
1329
+ offsets_obj,
1330
+ offset_trans,
1331
+ facecolors_obj,
1332
+ edgecolors_obj,
1333
+ linewidths,
1334
+ linestyles_obj,
1335
+ antialiaseds);
1336
+ } catch (const char * e) {
1337
+ throw Py::RuntimeError (e);
1338
+ }
1327
1339
} catch (...) {
1328
1340
if (free_edgecolors) Py_XDECREF (edgecolors_obj.ptr ());
1329
1341
throw ;
0 commit comments