Fix unused caught exception.

Signed-off-by: Timo Kinnunen <timo.kinnunen@gmail.com>