Improve error reporting in bart.