Friday, November 20, 2015

Build specific exception handling

       

try {
      //Do some stuff...
} catch (Exception ex) {
#if DEBUG
  throw;
#else
  throw;
#endif
}


       
 

Thursday, October 15, 2015

Wednesday, October 14, 2015

Wait a minute

       
if (result.getCode().equals("10")) {
                    log.info("Hammer Time! Sleeping one minute, waiting for the request to be processed by external entity");
                    Thread.sleep(60000);
                }
       
 

Just in case...

       
switch (a.variable)
{
 case 4:
 {
  if (a.variable == 4) 
  { 
   ...
  };
 }
}