From 65e931c1ffdff54fb53f1d5d1e29431f9d4c3251 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 17 Jul 2018 08:48:11 -0700 Subject: [PATCH] SCP: Provide context for unexpected event processing errors --- scp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scp.c b/scp.c index acd2570e..553b18b7 100644 --- a/scp.c +++ b/scp.c @@ -10603,6 +10603,13 @@ do { reason = SCPE_OK; } AIO_EVENT_COMPLETE(uptr, reason); + if ((reason != SCPE_OK) && /* Provide context for unexpected errors */ + (reason != SCPE_STOP) && + (reason != SCPE_STEP) && + (reason != SCPE_EXPECT) && + (reason != SCPE_EXIT) && + (reason != SCPE_REMOTE)) + reason = sim_messagef (SCPE_IERR, "\nUnexpected internal error while processing event for %s which returned %d - %s\n", sim_uname (uptr), reason, sim_error_text (reason)); } while ((reason == SCPE_OK) && (sim_interval <= 0) && (sim_clock_queue != QUEUE_LIST_END) &&