# Handling C++ exceptions

**URL:** <https://forums.swift.org/t/handling-c-exceptions/34823>\
**Category:** Discussion\
**Tags:** cxx-interop\
**Created:** [March 26, 2020, 2:30pm UTC](https://forums.swift.org/t/handling-c-exceptions/34823 "2020-03-26T14:30:31Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![michelf](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/michelf/32/1180_2.png) [@michelf](https://forums.swift.org/u/michelf)\
**Post date:** [March 26, 2020, 6:59pm UTC](https://forums.swift.org/t/handling-c-exceptions/34823/7 "2020-03-26T18:59:55Z")

</div>

Just throwing an idea out there: do the same as for pointers with unknown nullability.

```swift
func maybeThisCanThrow() throws!

```

This is an implicitly trapping throwing function: exceptions thrown from that function will trap unless the caller makes the call within a `try` expression:

```swift
try maybeThisCanThrow() // now you handle the exception
maybeThisCanThrow() // implicitly prefixed with `try!`

```

The compiler won't emit an error if you fail to use `try`, it'll just trap as if you had written `try!`. This is similar to implicitly unwrapped `nil` pointers.

Note that this behavior can be added later. I don't think there's a conflict with what is proposed here. Implicitly trapping `throws!` can be a future direction.

---

_[View the full topic](https://forums.swift.org/t/handling-c-exceptions/34823)._
