Bug Maximizer NullPointerException

Veracity

Developer
Staff member
Revision 20479 should allow:

Code:
string errorCondition = catch
{
  maximize( mme, false );
};
if ( errorCondition != "" )
{
  //dump a bunch of error related stuff, including errorCondition and mmx to the console so that it's easier to chase down the error
}
Note that there is now a ";" following the catch block. If you use a standalone catch block - i.e., one which does not look at the return value for catch - you don't need (can't have) one, by analogy to "static", which also takes a block of statements with no trailing semicolon.

But if you use catch EXPRESSION or catch BLOCK as a value, the usual punctuation for the context is required. In this case, it is the value in an assignment - and assignments end with a semicolon.
 
Top