Skip to content

Commit 76a3fec

Browse files
authored
update. (#52)
1 parent fb21845 commit 76a3fec

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ tasks.withType<JavaExec> {
5757
jvmArgs("--add-opens", "java.base/java.io=ALL-UNNAMED")
5858
jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED")
5959
jvmArgs("--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED")
60-
jvmArgs("-Dfray.recordSchedule=true")
60+
// jvmArgs("-Dfray.recordSchedule=true")
6161
doFirst {
6262
// Printing the full command
6363
println("Executing command: ${executable} ${jvmArgs!!.joinToString(" ")} -cp ${classpath.asPath} ${mainClass.get()} ${args!!.joinToString(" ")}")

core/src/main/kotlin/org/pastalab/fray/core/RunContext.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import org.pastalab.fray.core.concurrency.locks.ReferencedContextManager
2525
import org.pastalab.fray.core.concurrency.locks.SemaphoreManager
2626
import org.pastalab.fray.core.concurrency.operations.*
2727
import org.pastalab.fray.instrumentation.base.memory.VolatileManager
28+
import org.pastalab.fray.runtime.LivenessException
2829

2930
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
3031
class 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

Comments
 (0)