Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Report raw, unparsed error streams as a last resort. #941

Merged
merged 1 commit into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion org.lflang/src/org/lflang/generator/rust/RustGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ class RustGenerator(
} else if (context.cancelIndicator.isCanceled) {
context.finish(GeneratorResult.CANCELLED)
} else {
if (!errorsOccurred()) errorReporter.reportError("cargo failed with error code $cargoReturnCode")
if (!errorsOccurred()) errorReporter.reportError(
"cargo failed with error code $cargoReturnCode and reported the following error(s):\n${cargoCommand.errors}"
)
context.finish(GeneratorResult.FAILED)
}
}
Expand Down
6 changes: 3 additions & 3 deletions org.lflang/src/org/lflang/generator/ts/TSGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ class TSGenerator(
val protoc = commandFactory.createCommand("protoc", protocArgs, tsFileConfig.srcPath)

if (protoc == null) {
errorReporter.reportError("Processing .proto files requires libprotoc >= 3.6.1")
errorReporter.reportError("Processing .proto files requires libprotoc >= 3.6.1.")
return
}

Expand All @@ -393,7 +393,7 @@ class TSGenerator(
// targetConfig.compileLibraries.add('-l')
// targetConfig.compileLibraries.add('protobuf-c')
} else {
errorReporter.reportError("protoc returns error code $returnCode")
errorReporter.reportError("protoc failed with error code $returnCode.")
}
// FIXME: report errors from this command.
}
Expand Down Expand Up @@ -426,7 +426,7 @@ class TSGenerator(
if (babel.run(cancelIndicator) == 0) {
println("SUCCESS (compiling generated TypeScript code)")
} else {
errorReporter.reportError("Compiler failed.")
errorReporter.reportError("Compiler failed with the following errors:\n${babel.errors}")
}
}

Expand Down