Data-Structures
Data-Structures copied to clipboard
Modify error handling with exception handling
For example, for the file Stack.java, pushing into a full-stack is prevented by an if-else block, change all such occurrences with user-defined exceptions.
Hi, I'd like to pick this one up for hacktoberfest. I'm not entirely sure I understood what you mean by "user-defined exceptions". I was thinking to throw specific RuntimeException, to follow your example, defining a FullStackException extends RuntimeException and throw an instance of that. Would it be OK?
@lelloman ofcourse.
Great thanks, then I'm gonna do it :)