try catch around drawRange