0

Trying to catch an assertion failed exception with a message. Found the error after some annoying crashes. Not particularly fond of why the following message was generated, instead of simply telling the user that he/she forgot a "semi-colon" at the end of a statement. At other instances, missing a semi-colon results in a small red squiggle on the editor. Would've expected the same here!

try
{
    for(Constraint cc <- constraints)
    {

     ...
     ..
    }


}catch AssertionFailed(str msg)
{
  println("Error: <msg>")     //I had simply forgotten a semi-colon,
}

Resulted in console output: "Missing Modifier: java". Why is this message being generated and how is that helpful to the developer?

apil.tamang
  • 2,545
  • 7
  • 29
  • 40
  • Looks like something complicated happened here. Probably a bug or a combination of accidents. The code you show in the question is not enough to reproduce the problem. Please just submit a clean bug report with all the details and we might be able to improve things. The current question can be removed probably from attack overflow since it has no answer in code. – Jurgen Vinju Mar 02 '15 at 18:04
  • I tried to replicate it using a small code fragment, alike structurally, but without everything thrown in. I couldn't reproduce the problem. In other words, the editor was able to flag it down just fine. What would you recommend me to do? Again, this may be a combination of accidents only traceable within Eclipse, and it isn't exactly impeding any of my work. – apil.tamang Mar 03 '15 at 17:22
  • Hi! thanks for trying that. For now it looks like a weird fluke, perhaps something to do with the `"Error: "` . I'd forget about it if I were you and get on with other things. Thanks for signaling this problem (next time perhaps on github issues?). If we end up in a similar situation we might be able to compare and come to a hypothesis. – Jurgen Vinju Mar 04 '15 at 18:05

0 Answers0