Try catching exception in lo_create_handle.