Is there a Java equivalent of C#’s InvalidOperationException? [duplicate]
Probably IllegalStateException. From what I read about InvalidOperationException: “The exception that is thrown when a method call is invalid for the object’s current state.” For IllegalStateException: “Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for … Read more