Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon


< >
try { undefinedFn() } catch (err) { console.log(err) }
Example from Ruby:
def hello puts "Hello, World!" # start an exception handler begin raise "This is an exception" rescue => e puts "Exception caught: #{e}" end end hello
Example from Elixir:
raise "oops, something went wrong"
Example from REBOL:
catch [throw 22 print "You'll never see this."] try/except [read %does_not_exist] [print "File not found"]
Example from Boron:
catch [throw 22 print "You'll never see this."] if error? try [read %does_not_exist] [print "File not found"]

Languages with Exceptions include Java, JavaScript, C++, PHP, C#, Ruby, Scala, Swift, Kotlin, PowerShell, TypeScript, Elixir, Dart, Solidity, CoffeeScript, Groovy, ABAP, REBOL, X10, Pizza, Apex, Boron, Sophia, Deesel, Real-Time Concurrent C, Static Typescript

Languages without Exceptions include C, Objective-C, progsbase, Tick C, cooC

Read more about Exceptions on the web: 1.

HTML of this page generated by Features.ts

hasEscapeCharacters.html 路 hasExceptions.html 路 hasExplicitTypeCasting.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub