kijiproject/kiji-schema — pull request #7 by kimballa (2012-11-28 03:35:20+00:00)
Title: Schema 34 general exceptions

SCHEMA-34. Handle general exceptions more gracefully in Kiji tools.

By default, print just the error message from the terminating exception.
If the user specifies the '--debug' flag, rethrow the exception.

Tested with mvn verify.
Then ran:

aaron@topsail:~/src/kiji/kiji-schema (schema-34-general-exceptions)$ bin/kiji ls --max-rows=-4
--max-rows must be positive
aaron@topsail:~/src/kiji/kiji-schema (schema-34-general-exceptions)$ bin/kiji ls --max-rows=-4 --debug
Exception in thread "main" java.lang.RuntimeException: --max-rows must be positive
at org.kiji.schema.tools.LsTool.validateFlags(LsTool.java:361)
at org.kiji.schema.tools.BaseTool.run(BaseTool.java:154)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at org.kiji.schema.tools.LsTool.main(LsTool.java:622)

Only the top-most commit is part of this pull request. The base commit is covered by SCHEMA-23 (https://github.com/kijiproject/kiji-schema/pull/6)