The problem is not the variable never used. This is just an informative warning just to allow you to remove the unused variable and have more clear code.
The real problem here is the fact that you have an EMPTY catch block. This means that you don't see any exception generated in the try block above. Thus you will never know of the presence of an error in your code. Never write an empty catch block even for debugging purposes. If you can't do anything to fix the 'exceptional' problem then do not catch it and let it bubble up the stack chain when some upper level catch block can do something to handle the error.
For example writing, in a log file, the whole information about the exception. Writing a log file of your exceptions is an effective way to track errors even when your code is no more running in a debug environment.