Java exception handling

[Java exception handling]

This is a memo of Java exception handling used in business. I used it during development, so I summarized it.

Java has a handy feature called exception handling

Exceptions occur during unusual special conditions when running a Java program. Exception handling is executed when an exception occurs.

As an aside, I thought that the program structure of exception handling was visually easy to understand, like an if statement.

try --catch --finally syntax

//Exception handling syntax

try{
  //Processing that may cause an exception;
} catch (Exception class variable name){
  //What to do when an exception occurs(Processing that is not performed unless an exception occurs);
} finally {
  //The last process to be executed regardless of the presence or absence of exceptions
}

Normal execution is only try block. If an exception occurs, the process immediately shifts to the catch block.

Digression

At present, most SE operations include creating specifications in Excel and responding to emails. ..

Under such circumstances, I am doing my best, thanking you for being involved in Java development.

Recommended Posts

Java exception handling?
☾ Java / Exception handling
Java exception handling
Java exception handling
Exception handling
Exception handling Exception
[Java] Practice of exception handling [Exception]
[Java] About try-catch exception handling
Java exception handling usage rules
Exception handling techniques in Java
About exception handling
[In-house study session] Java exception handling (2017/04/26)
[Java] Exception instance
Ruby exception handling
Step-by-step understanding of Java exception handling
[For Java beginners] About exception handling
Java (exception handling, threading, collection, file IO)
try-catch-finally exception handling How to use java
About Ruby exception handling
Exception handling practice (ArithmeticException)
[Ruby] Exception handling basics
[java] throw an exception
Spring Boot exception handling
Questions in java exception handling throw and try-catch
Java basic learning content 7 (exception)
[Ruby] Exception handling in functions
exception
Java
[Java Silver] (Exception handling) About try-catch-finally and try-with-resource statements
Java
Handling of time zones using Java
[Rails] How to write exception handling?
[Note] Handling of Java decimal point
Unexpected exception when using Java DateTimeFormatter
[Java] What is Concurrent Modification Exception?
Exception handling with a fluid interface
[Java] Exception types and basic processing
(Learning memo) Java 2nd grade measures: Q4 main points (exception handling)
[Introduction to Java] About exception handling (try-catch-finally, checked exception, unchecked exception, throws, throw)
Leverage Either for individual exception handling in the Java Stream API
Studying Java ―― 3
[Java] array
Java protected
[Java] Annotation
[Java] Module
Java array
Studying Java ―― 9
Java scratch scratch
Java tips, tips
Java methods
Java method
java (constructor)
Java array
[Java] ArrayDeque
java (override)
java (method)
Java Day 2018
Java string
java (array)
Java static
Java serialization