@@ -941,7 +941,11 @@ RendererAgg::draw_path(const Py::Tuple& args) {
941941 if (snap)
942942 gc.isaa = false ;
943943
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+ }
945949
946950 return Py::Object ();
947951}
@@ -1175,20 +1179,24 @@ RendererAgg::draw_path_collection(const Py::Tuple& args) {
11751179
11761180 PathListGenerator path_generator (paths);
11771181
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+ }
11921200
11931201 return Py::Object ();
11941202}
@@ -1310,20 +1318,24 @@ RendererAgg::draw_quad_mesh(const Py::Tuple& args) {
13101318 }
13111319
13121320 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+ }
13271339 } catch (...) {
13281340 if (free_edgecolors) Py_XDECREF (edgecolors_obj.ptr ());
13291341 throw ;
0 commit comments