Was leaking cursor bitmap.
Throw a meaningful string instead of just -1. Catch the specific exception.