[pt::Builder] add error handling

first pass at some of the TODO items
@farcaller by "report error", did you mean printing out something decent here?