Skip to content

Commit

Permalink
use ZincCompileError for fun
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Feb 10, 2019
1 parent 2a09f67 commit 0ef3a14
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ def relative_to_exec_root(path):
self.NAILGUN: lambda: self._compile_nonhermetic(jvm_options, zinc_args),
})()

class ZincCompileError(TaskError): pass
class ZincCompileError(TaskError):
"""An exception type specifically to signal a failed zinc execution."""

def _compile_nonhermetic(self, jvm_options, zinc_args):
exit_code = self.runjava(classpath=self.get_zinc_compiler_classpath(),
Expand Down Expand Up @@ -462,7 +463,7 @@ def _compile_hermetic(self, jvm_options, ctx, classes_dir, zinc_args, compiler_b
req, self.name(), [WorkUnitLabel.COMPILER])

if res.exit_code != 0:
raise TaskError(res.stderr, exit_code=res.exit_code)
raise self.ZincCompileError(res.stderr, exit_code=res.exit_code)

# TODO: Materialize as a batch in do_compile or somewhere
self.context._scheduler.materialize_directories((
Expand Down

0 comments on commit 0ef3a14

Please sign in to comment.