aconfig: improve error messages
Propagate anyhow errors to main.rs and commands.rs to improve the error message. As an example. instead of just "bad flag declaration: exactly one bug required", aconfig will now print the following. ---- 8< ---- Error: failed to create cache Caused by: 0: failed to parse build/make/tools/aconfig/tests/test.aconfig 1: bad flag declaration: missing description ---- >8 ---- Error messages can be improved further by including additional information in the protos.rs error cases. This will be handled in a follow-up CL. Bug: 290300657 Test: manual: introduce error in an aconfig file and run `m all_aconfig_declarations` Test: atest aconfig.test Change-Id: Id278f4877e5794b95913ae8ba0ca3ee211293f38
Loading
Please register or sign in to comment