@@ -25,6 +25,7 @@ import org.pastalab.fray.core.concurrency.locks.ReferencedContextManager
2525import org.pastalab.fray.core.concurrency.locks.SemaphoreManager
2626import org.pastalab.fray.core.concurrency.operations.*
2727import org.pastalab.fray.instrumentation.base.memory.VolatileManager
28+ import org.pastalab.fray.runtime.LivenessException
2829
2930@Suppress(" PLATFORM_CLASS_MAPPED_TO_KOTLIN" )
3031class RunContext (val config : Configuration ) {
@@ -64,6 +65,10 @@ class RunContext(val config: Configuration) {
6465 }
6566
6667 fun reportError (e : Throwable ) {
68+ if (e is LivenessException ) {
69+ // Let's do not report liveness exceptions.
70+ return
71+ }
6772 if (bugFound == null && ! config.executionInfo.ignoreUnhandledExceptions) {
6873 bugFound = e
6974 val sw = StringWriter ()
@@ -89,6 +94,7 @@ class RunContext(val config: Configuration) {
8994 config.frayLogger.error(
9095 " Error found, the recording is saved to ${config.report} /recording_0/" )
9196 println (" Error found, you may find the error report in ${config.report} " )
97+ config.frayLogger.error(" Error found with step: $step " )
9298 config.saveToReportFolder(0 )
9399 }
94100 exitProcess(0 )
@@ -963,7 +969,7 @@ class RunContext(val config: Configuration) {
963969 Thread .currentThread() !is HelperThread &&
964970 ! (mainExiting && currentThreadId == mainThreadId)) {
965971 currentThread.state = ThreadState .Running
966- val e = org.pastalab.fray.runtime. LivenessException ()
972+ val e = LivenessException ()
967973 reportError(e)
968974 throw e
969975 }
0 commit comments