OP-421 Groovy to Java conversion
Added better exception handling to unit of work which takes Error into consideration. Using Guava Throwables utility instead of re-making this