compiler: add locations to error exceptions
compiler: don't print stack for error exceptions unless requested