Skip to content

Introduce exit_on_error and use this instead of throw_on_error everywhere#4081

Merged
emilk merged 10 commits intomainfrom
andreas/cpp/exit-on-error
Oct 30, 2023
Merged

Introduce exit_on_error and use this instead of throw_on_error everywhere#4081
emilk merged 10 commits intomainfrom
andreas/cpp/exit-on-error

Conversation

@Wumpf
Copy link
Copy Markdown
Member

@Wumpf Wumpf commented Oct 30, 2023

What

Throwing doesn't look great especially on windows debug builds:
image

Thew new method gives a nice error when you start from command line:

 build\Debug\example_dna.exe
Expected env-var RERUN_STRICT to be 0/1 true/false yes/no on/off, found ''Rerun ERROR: Failed to find Rerun Viewer executable in PATH.

    You can install binary releases of the Rerun Viewer:
    * Using `cargo`: `cargo binstall rerun-cli` (see https://github.com/cargo-bins/cargo-binstall)
    * Via direct download from our release assets: https://github.com/rerun-io/rerun/releases/latest/
    * Using `pip`: `pip3 install rerun-sdk` (warning: pip version has slower start times!)

    For more information, refer to our complete install documentation over at:
    https://rerun.io/docs/getting-started/installing-viewer

Also fixed typo in the C++ tutorial and added windows specific instructions

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added enhancement New feature or request examples Issues relating to the Rerun examples sdk-cpp C/C++ API specific exclude from changelog PRs with this won't show up in CHANGELOG.md labels Oct 30, 2023
@emilk emilk self-requested a review October 30, 2023 15:14
@emilk emilk merged commit 493aa98 into main Oct 30, 2023
@emilk emilk deleted the andreas/cpp/exit-on-error branch October 30, 2023 16:16
emilk added a commit that referenced this pull request Oct 30, 2023
…erywhere (#4081)

### What

Throwing doesn't look great especially on windows debug builds:

![image](https://github.com/rerun-io/rerun/assets/1220815/ec44224e-cc17-4b2b-8054-42a038da5d3a)

Thew new method gives a nice error when you start from command line:
```
 build\Debug\example_dna.exe
Expected env-var RERUN_STRICT to be 0/1 true/false yes/no on/off, found ''Rerun ERROR: Failed to find Rerun Viewer executable in PATH.

    You can install binary releases of the Rerun Viewer:
    * Using `cargo`: `cargo binstall rerun-cli` (see https://github.com/cargo-bins/cargo-binstall)
    * Via direct download from our release assets: https://github.com/rerun-io/rerun/releases/latest/
    * Using `pip`: `pip3 install rerun-sdk` (warning: pip version has slower start times!)

    For more information, refer to our complete install documentation over at:
    https://rerun.io/docs/getting-started/installing-viewer
```



Also fixed typo in the C++ tutorial and added windows specific
instructions


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4081) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4081)
- [Docs
preview](https://rerun.io/preview/7dcf776f91aae882c88e87fa1d0108bf63704728/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/7dcf776f91aae882c88e87fa1d0108bf63704728/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request examples Issues relating to the Rerun examples exclude from changelog PRs with this won't show up in CHANGELOG.md sdk-cpp C/C++ API specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants