Skip to content

Commit

Permalink
If unable to emit C file, dont fail
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 2, 2023
1 parent 6755325 commit 6d4203f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,12 @@ class XcfaCli(private val args: Array<String>) {
val xcfaDotFile = File(resultFolder, "xcfa.dot")
xcfaDotFile.writeText(xcfa.toDot())

val xcfaCFile = File(resultFolder, "xcfa.c")
xcfaCFile.writeText(xcfa.toC(parseContext, useArr, useExArr, useRange))
try {
val xcfaCFile = File(resultFolder, "xcfa.c")
xcfaCFile.writeText(xcfa.toC(parseContext, useArr, useExArr, useRange))
} catch (e: Throwable) {
logger.write(Logger.Level.VERBOSE, "Could not emit C file")
}

val xcfaJsonFile = File(resultFolder, "xcfa.json")
val uglyJson = gsonForOutput.toJson(xcfa)
Expand Down

0 comments on commit 6d4203f

Please sign in to comment.