Exceptions occur due to many reasons. Invalid user input, code errors, device failure, and insufficient memory to run an application may be the potential causes. The exception also arises when users attempt to access a non-existent file, divide by zero, and memory conflict between two running programs. Exception handling is the method that responds to unexpected events when a computer program executes. It takes care of these incidents to avoid a program or system crashing. A function throws an exception when it fails to handle some exceptional events. Many computer languages have built-in syntactic support to handle the exceptions.
- Standard libraries not available
- Standard libraries modified
- Incorrect return code from external function
- Wrong parameters passed to function
Null pointer and memory problem
- Invalid pointer dereferenced
- Array boundary violation
- Memory allocation error
- Insufficient memory
- Non-allocated memory accessed
- Corrupt memory
- Buffer overflow
- Illegal access
I/O and file problems
- File does not exist
- File permission incorrect
- File corrupted
- File moved
- Invalid filename
- Output file already exists
- File locked by another program
External user/client problem
- No response to prompt
- Late response to prompt
- Erroneous response to prompt
- Incorrect command line arguments
- Insufficient disk space
- Power outage
- Spurious interrupts
- Disconnected / Dismounted
- Corrupt memory
- Transient errors
Return-value problem: function/procedure call
- Wrong type of arguments
- Wrong number of arguments
- Value of arguments invalid
- Failure to handle error return code
- Divide by zero
- Uninitialized variable
- Square root of a negative number
- Type mismatch
- Insufficient precision
- Overflow /underflow
- Missing end of file
- Data values outside of range
- Missing data
- Extraneous data
- Non-numerics in numeric field
- Incorrect delimiters
- Empty data file
This Ishikawa diagram contains some of the main reasons for the failure of a function with an exception. This root cause analysis template helps to organize a variety of reasons for similar or different issues.
Who should use the Exception Failure template?
- Anyone who wants to understand the potential causes for an exception.
- Anyone who wants to learn why a function or method call may fail with an exception.
Why use this template?
- Understand the various reasons for an exception failure.
- Change and reuse this template using smartQED for your own problem-solving.
- Create templates for any problem analysis in smartQED.
Curated from community experience and public source: