tag

home / developersection / tag

Exception Handling in Programming | Tackle Unnecessary Errors while Running
Exception Handling in Programming | Tackle Unnecessary Errors while Running

Exception Handling are the mechanism to handle the running errors so that the normal flow of the application can be maintained.

Java I/O: Input/Output Streams
java 24-May-2016
Java I/O: Input/Output Streams

One of the important set of classes comprised in Java API is the java.io package. This is one of the core packages of the Java language and was a part of JDK 1.0. These classes facilitate the input/output functionality in our programs.

Exception Handling in Java: The throw Statement
java 23-May-2016
Exception Handling in Java: The throw Statement

As seen in the previous post, we need to construct an instance of a user-defined exception; the Java runtime cannot detect and create instances of user-defined exceptions.

Exception Handling in Java: User-defined Exceptions
java 23-May-2016
Exception Handling in Java: User-defined Exceptions

Sometimes we may find that the exception messages given by the standard exception classes are not intuitive, and it may be necessary to provide more elaborate messages to the application user.

Exception Handling in Java: final Re-throw and Exceptions in Overriding Methods
java 23-May-2016
Exception Handling in Java: final Re-throw and Exceptions in Overriding Methods

The throw keyword (note the singular form) is used to force an exception.

Exception Handling in Java: Declaring Exceptions in Overriding Methods
java 21-May-2016
Exception Handling in Java: Declaring Exceptions in Overriding Methods

Let’s recall the rules we learn from previous post about declaring exception in Overriding Methods.

Exception Handling in Java: Guidelines on the use of finally block
java 20-May-2016
Exception Handling in Java: Guidelines on the use of finally block

We may have a finally block in conjunction with a try block without a catch block. In other words

Exception Handling in Java: Multiple Exception Handlers
java 20-May-2016
Exception Handling in Java: Multiple Exception Handlers

Let’s now look at an example where the running code generates multiple types of exceptions.

Example of Exception handling in C#
Example of Exception handling in C#

In every program, things go wrong sometimes. With C#, we're blessed with a good compiler, which will help us prevent some of the most common mistakes.

Exception Handling in C Sharp
Exception Handling in C Sharp

Handling of error occurring at Run-time is known as Exception handling. Exception handling is a way to prevent application from crashing. C# provides three keywords to handle exceptions.