Skip to content
Advertisement

Tag: exception

Send Object Over Java Socket

I have a class name player (It is for creating a new player) I also have a client class: And im using objectOutputStream but it says that it “java.io.NotSerializableException: objects.Player” And I want to send my player to the server but it says that exception! Also if you need here is the server class and also if you want here

Spring Webflux – Proper way to throw checked custom exception (not RuntimeException)

May I ask what is the proper way to throw checked custom exception in Spring webflux please? I would like to insist, it is about checked custom exception, like MyException.java, not something like RuntimeException, and it is about throwing exception, not handling exception. I tried the following : This is not possible, since there in an unhandled exception in getSecondStepFromFirstStepAfterCheck

Throwing own exceptions

I have this class Account Now I also have this exception that I wrote Now I need to throw this exception in the class account,when the searched account number does not exist.Now my question is in which method(or function I think that is the same,please correct me if I’m wrong) do I throw this exception.And after what check.How would I

Serial version uid in abstract exception class

I have a base custom exception class BaseException and several custom exceptions that extends BaseException I got a warning about serial version uid being not declared in the BaseException class. Is it needed in an abstract class? Is it a good practice? Is any way to get rid of the warning? Answer Yes, you need to define the serialVersionUID in

Advertisement