Catching java.lang.OutOfMemoryError