# Intercepting error messages - HOW?

**URL:** <https://discourse.julialang.org/t/intercepting-error-messages-how/77189>\
**Category:** General Usage\
**Tags:** question, error-message\
**Created:** [February 28, 2022, 2:21pm UTC](https://discourse.julialang.org/t/intercepting-error-messages-how/77189 "2022-02-28T14:21:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [February 28, 2022, 3:22pm UTC](https://discourse.julialang.org/t/intercepting-error-messages-how/77189/4 "2022-02-28T15:22:33Z")

</div>

> [@FedeClaudi](#):
>
> But is there an alternative to it like python’s exception hook?

There is `Base.Experimental.register_error_hint`, but you seem to already have discovered that. Your projects looks very exciting, so if you have a concrete proposal for what kind of hooks you would need, I think the core devs would be open to discuss potential changes to base.

> [@FedeClaudi](#):
>
> If lines like `Base.invokelatest(Base.display_error, errio, val)` that you’ve send above (and similar ones e.g. in VSCode’s Julia Extension) are what prints out the error, then I’m guessing I have to re-define `Base.display_error` ?

`display_error` should end up calling `showerror`, so redefining that should have similar effects.

---

_[View the full topic](https://discourse.julialang.org/t/intercepting-error-messages-how/77189)._
