Want show error message with my logic

diagnoz4 days ago

Hello,

I wanna check device name (for example device name == "testDevice"), and if this is true show error message "Bad device name".
I open sources and found methd

public Response add(T entity) throws Exception {/*...*/}

I wrote inside this methos throw new SecurityException("Bad device name");

And when I try add new device I see very big message like java.lang.Exception: Bad device name at org.traccar.api.BaseObjectResource.add(BaseObjectResource.java:75) at.......

Question: How can I show only my short message?