add a throws declaration to the function and import exception
Which function as i have added according to the functions mentioned in module 7
i havent completed but i tried to solve this issue you should add throws to annualreturnapp/AnnualReturnController.java to function where line 41 is present
But we should not change anything in the annual returns app right?
i think its for test files
If you’re still struggling with this issue.
- Pull new annual-return-app from git
- If this will not work then check whether in function definition
throws JsonProcessingExceptionis present or not. Line number is clearly mentioned in error where this exception is coming from.
calculateAnnualizedReturns method in code, you aren’t catching JsonProcessingException.
You need to add this exception to throws deceleration of calculateAnnualizedReturns and catch it as well. You can do that by catching a generic Throwable object and throwing RunTimeException, as required in the module. Please note that you may need to do this for other functions that call
calculateAnnualizedReturns. The compiler will inform you of that.
Let me know if this helps!
Hey is your issue resolved? can you confirm from your side that you have done a git Checkout for this particular module?
Are you done with this error if not then checked Exception needs to be handled.
I am done with the issue and moved on to the next module.
Closing this topic as your issue has been resolved by the community.
If any of the above replies helped you in resolving the issue, you can mark it as a solution.