From 417c18fec73fed9b756a4b6005881a868a1cd22e Mon Sep 17 00:00:00 2001 From: Sandy Noble Date: Mon, 5 Nov 2018 21:36:13 +0000 Subject: [PATCH] Add try/catch around the previewQueue(). Fixes #19 --- polargraphcontroller.pde | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/polargraphcontroller.pde b/polargraphcontroller.pde index c6a8a54..9508df1 100644 --- a/polargraphcontroller.pde +++ b/polargraphcontroller.pde @@ -843,8 +843,17 @@ void drawImagePage() showGroupBox(); showCurrentMachinePosition(); - if (displayingQueuePreview) - previewQueue(); + + try { + if (displayingQueuePreview) + previewQueue(); + } + catch (ConcurrentModificationException cme) + { + // not sure why this prompts an exception. Will revisit this another day. + println("Caught CME coming from previewQueue(): " + cme.getMessage()); + } + if (displayingInfoTextOnInputPage) showText(250,45); drawStatusText((int)statusTextPosition.x, (int)statusTextPosition.y);