Remove exception wrapping from query compilation