why is this err caused?...
This is an auto-generated question from the MPS Slack community: why is this err caused?
5 comments
Sort by
Date
Votes
can't you print an exception in mps?
Your surrounding method expects a return statement or 'returnable' expression, I guess.
Yes this is the case.
If you define a method with a return type, it needs a return statement. If you don't specify a return statement it implicitly chooses the last statement as return. In your case it is a println call, which returns void, which is not a legal return statement.
This is auto-generated question from the MPS Community Slack Workspace. If you want to comment on the question, do it from the Slack workspace
Post is closed for comments.