File src/de/openrat/client/util/ServerSideException.java
Last commit: Thu Jan 10 18:06:28 2019 +0100 Jan Dankert Convert serverside-Exception into a Java Exception.
1 package de.openrat.client.util; 2 3 public class ServerSideException extends Exception { 4 5 private String name; 6 7 public ServerSideException() { 8 9 } 10 11 public ServerSideException(String message, String name) { 12 super(message); 13 this.name = name; 14 } 15 16 17 public ServerSideException(String message) { 18 super(message); 19 } 20 21 22 public String toString() { 23 // if name is set, use it and not the class name. 24 String s = (name != null) ? name : getClass().getName(); 25 26 String message = getLocalizedMessage(); 27 return (message != null) ? (s + ": " + message) : s; 28 } 29 }
Downloadsrc/de/openrat/client/util/ServerSideException.java
History Thu, 10 Jan 2019 18:06:28 +0100 Jan Dankert Convert serverside-Exception into a Java Exception. Wed, 19 Dec 2018 15:57:00 +0100 Jan Dankert better example for server message. Wed, 19 Dec 2018 15:41:12 +0100 Jan Dankert new Exception for converting server-side exceptions.