# Can @pure functions throw an error?

**URL:** https://discourse.julialang.org/t/can-pure-functions-throw-an-error/18459
**Category:** Internals & Design
**Tags:** question
**Created:** [December 8, 2018, 10:36am UTC](https://discourse.julialang.org/t/can-pure-functions-throw-an-error/18459 "2018-12-08T10:36:18Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)
#### Post date: [December 17, 2018, 5:24pm UTC](https://discourse.julialang.org/t/can-pure-functions-throw-an-error/18459/2 "2018-12-17T17:24:12Z")

</div>

Probably a very bad idea, as `pure` means we can discard or duplicate side-effects, which then also means we can transform any program that might call this function into one that always throws this error at startup

---

_[View the full topic](https://discourse.julialang.org/t/can-pure-functions-throw-an-error/18459)._
