-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in one formatter prevents other formatters from working #803
Comments
brasmusson
added a commit
to brasmusson/cucumber-jvm
that referenced
this issue
Mar 15, 2015
The IntelliJ formatter does not implement the startOfScenarioLifeCycle and the endOfScenarioLifeCycle methods. Also when it is throwing an exception on these methods, all other formatters used need to be called on these methods.
brasmusson
added a commit
to brasmusson/cucumber-jvm
that referenced
this issue
Mar 15, 2015
The IntelliJ formatter does not implement the startOfScenarioLifeCycle and the endOfScenarioLifeCycle methods. Also when it is throwing an exception on these methods, all other formatters used need to be called on these methods.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have encountered this when trying to run RerunFormatter in cucumber-jvm 1.2.0 together with IntelliJ's org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter. If the IntelliJ formatter is added before the RerunFormatter, the RerunFormatter does not work. The problem is that CucumberJvmSMFormatter does not support new Formatter methods like startOfScenarioLifeCycle and endOfScenarioLifeCycle. These methods are invoked in a loop for each plugin (formatter) by the pluginProxy method in RuntimeOptions so if one plugin throws an exception - the code exits from the loop and the methods of plugins after the offending one are not called.
Also in the CucumberScenario class's 'run' method the exception from startOfScenarioLifeCycle and endOfScenarioLifeCycle are caught silently which makes it very difficult to understand what is happening and why other plugins are not working:
The solution would probably be to catch the exceptions in pluginProxy loop so that all plugins have their methods invoked, or at least provide the output from the exception so that the problem could be detected more easily.
The text was updated successfully, but these errors were encountered: