₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,112 members, 8,420,413 topics. Date: Thursday, 04 June 2026 at 06:58 PM

Toggle theme

What Is The Difference Between Runtimeexception And Exception Classes? - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingWhat Is The Difference Between Runtimeexception And Exception Classes? (1803 Views)

1 Reply (Go Down)

What Is The Difference Between Runtimeexception And Exception Classes? by paranorman(op): 9:21am On Sep 22, 2016
Was cool with the Exception Class till I ran into Runtimeexception. Was the major difference between these two folks and when is it proper to use any of them?
Re: What Is The Difference Between Runtimeexception And Exception Classes? by dueal(m): 10:59am On Sep 22, 2016
paranorman:
Was cool with the Exception Class till I ran into Runtimeexception. Was the major difference between these two folks and when is it proper to use any of them?
Typically in OOP languages that support structured exception handling(SEH) every exception is is a datatype. So to follow OOP ideas, Exception class is a general datatype to represent exceptional conditions which derived classes can inherit from to specify a more concrete exception.

RuntimeException class then is a concrete type to strictly represent runtime exceptions. It's kindof a redundant name but hey...it's there.
Re: What Is The Difference Between Runtimeexception And Exception Classes? by paranorman(op): 11:35am On Sep 22, 2016
dueal:
Typically in OOP languages that support structured exception handling(SEH) every exception is is a datatype. So to follow OOP ideas, Exception class is a general datatype to represent exceptional conditions which derived classes can inherit from to specify a more concrete exception.

RuntimeException class then is a concrete type to strictly represent runtime exceptions. It's kindof a redundant name but hey...it's there.
okay, thanks.
Re: What Is The Difference Between Runtimeexception And Exception Classes? by ugwum007(m): 2:34pm On Sep 24, 2016
Runtime exceptions are throwed during the operations of the JVM.
Re: What Is The Difference Between Runtimeexception And Exception Classes? by paranorman(op): 6:25pm On Sep 24, 2016
ugwum007:
Runtime exceptions are throwed during the operations of the JVM.
pardon my ignorance, what's 'JVM'? I ain't pro yet, just a wannabe.
Re: What Is The Difference Between Runtimeexception And Exception Classes? by originalhuman: 9:54pm On Sep 24, 2016
paranorman:
pardon my ignorance, what's 'JVM'? I ain't pro yet, just a wannabe.
Java Virtual Machine
Re: What Is The Difference Between Runtimeexception And Exception Classes? by toheebDOTcom(m): 3:56pm On Oct 07, 2016
No major answer here, so I will post this..

In some language, exceptions are errors you can catch. it means they won't halt the execution of your script.

Errors can happen at different stages, during compilation (eg when you forget a ';') or Runtime (eg when you call an undefined function or you require a non existing file) .

Such errors that happen at Runtime triggers a RuntimeException Class. This class generates the appropriate exception be it a memory, underflow, overflow, range ET cetera...


tag: paranorman
Re: What Is The Difference Between Runtimeexception And Exception Classes? by paranorman(op): 6:34pm On Oct 07, 2016
toheebDOTcom:
No major answer here, so I will post this..

In some language, exceptions are errors you can catch. it means they won't halt the execution of your script.

Errors can happen at different stages, during compilation (eg when you forget a ';') or Runtime (eg when you call an undefined function or you require a non existing file) .

Such errors that happen at Runtime triggers a RuntimeException Class. This class generates the appropriate exception be it a memory, underflow, overflow, range ET cetera...


tag: paranorman
you did a good job explaining. Thanks.

How long have you been programming and what languages are you pro in?
Re: What Is The Difference Between Runtimeexception And Exception Classes? by toheebDOTcom(m): 8:25pm On Oct 07, 2016
paranorman:
you did a good job explaining. Thanks.
How long have you been programming and what languages are you pro in?
PHP. Some months now...
1 Reply

The Difference Between A Programmer, Coder, Developer And EngineerThe Difference Between Java And JavascriptWhat Is The Difference Between A URL, URI And A SLUG234

CCNA Self-training[php Tutorial] - Building A Rest ApiAn Error Occurred At Log Record Id.