You can view this scenario as -
What happens is your try blocks fails to initialize the someObject.
This means there might be some exception in someOperation()
method. Exception will be caught but someObject
will not be initialized.
You can fix this by setting someObject
to null or new SomeObject()
in catch block.