[9.2.0] Prevent UrlRewriterParseException from being wrapped in RuntimeException (https://github.com/bazelbuild/bazel/pull/28305) (#30212) When attempting to run a Bazel command, Bazel server will shutdown and exit with an unexpected error when the [downloader config](https://bazel.build/reference/command-line-reference#common_options-flag--downloader_config) is invalid: ``` $ echo "#test\nfoo" > bazel_downloader.cfg $ cat bazel_downloader.cfg #test foo $ bazel-dev build //... --downloader_config=bazel_downloader.cfg < exits immediately with the Bazel server killed > $ echo $? 37 ``` `37` corresponds to `Unhandled Exception / Internal Bazel Error` as per the [docs](https://bazel.build/run/scripts#exit-codes). This PR introduces changes that will let catch and rethrow `UrlRewriterParseException` before `Closer.rethrow()` to prevent it from being wrapped in `RuntimeException`. ``` $ bazel-dev-fixed query //... --downloader_config=bazel_downloader.cfg ... ERROR: Failed to parse downloader config at bazel_downloader.cfg:2: Unable to parse: foo $ echo $? 2 ``` Closes #28305. PiperOrigin-RevId: 891501161 Change-Id: I3cbfe2e2cdcad14c6b5e8210e2e1b8e999eba0ae Commit https://github.com/bazelbuild/bazel/commit/45ea1f009a76996b32d8eda0bd5f43f958a68293 Co-authored-by: Alexey Tereshenkov <50622389+AlexTereshenkov@users.noreply.github.com>
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md