From 73f731d78ea4652a7c5d8d02535eb4f4450db684 Mon Sep 17 00:00:00 2001 From: Russell Standish Date: Tue, 16 Jul 2024 17:47:40 +1000 Subject: [PATCH] Add try/catch blocks around rendering items on the canvas. For Ravel #613. --- model/canvas.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/model/canvas.cc b/model/canvas.cc index c1abd1498..10e1b3149 100644 --- a/model/canvas.cc +++ b/model/canvas.cc @@ -852,7 +852,14 @@ namespace minsky const CairoSave cs(cairo); cairo_identity_matrix(cairo); cairo_translate(cairo,it.x(), it.y()); - it.draw(cairo); + try + { + it.draw(cairo); + } + catch (const std::exception& ex) + { + cerr << ex.what() << endl; + } } return false; });