Added parameter '--throw-exception', which can not be specified togheter... #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Consider the following DNA file:
It contains a reference to an undefined python variable called
name
. When generating the output, there's nothing:When adding
--rna
and executing the resulting code it's quite clear the problem is a variable that isn't defined:To fix this, and not break backwards compatibility I added a new parameter
--throw-exception
(couldn't come up with a better name...) which basically works as--rna
but writing the RNA code to stdout instead. When specifying the new parameter, the try-catch-exception code parts will not be added to the generated RNA code. The parameter can not be specified at the same time as--rna
(mutually exclusive):The new parameter, in combination with using
subprocess.Popen()
instead ofsubprocess.call()
makes it possible to readstderr
for any error messages and display them:All "legacy" tests passed!