Problem I’m creating my own application exception types so I could catch them higher in the call stack and take […]
Tag: exception
Accumulating inner exception messages
Problem Say, there is a class with some methods, that have try catch blocks. I need to accumulate messages from […]
Throwing exceptions when validation fails
Problem When I want to check the validity of an attendance being entered into the system, I perform following action. […]
Custom exceptions for validating movie information
Problem I wrote my first application about custom exceptions and catching them. Here is the GitHub link. I Have 3 […]
Checking if a directory exists in FTP without relying on exception handling
Problem I’ve written a method to check if a directory already exists on an FTP server. The only way I […]
Wordle guesser, breaking out of loop by raising exception
Problem After many years away from writing in Python, I am getting back into it. Specifically, I am trying to […]
Good approach to raise an exception
Problem I have class House and module Lockable. Locking and unlocking House should reflect the real world, so you can’t […]
What’s your opinion on a Throw() method?
Problem Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is […]
“Guess a random letter” game with command line interface
Problem The code below if launched on the command line is a simple guessing game. A random character ‘a’, ‘b’ […]
Custom exception for string that is too long
Problem This is my first time working with Java exceptions. I have made a program that works to specifications, but […]