Skip to content

Commit

Permalink
Adding static error message, mostly to make formatting the code easier.
Browse files Browse the repository at this point in the history
  • Loading branch information
jottinger committed Sep 19, 2012
1 parent da243e7 commit d1af870
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.net.URL;

public abstract class BaseConnector implements Connector {
public static final String ERROR_MESSAGE =
"No uri provided for connector";
String uri;

@Override
Expand Down Expand Up @@ -34,7 +36,7 @@ public void disconnect() {
public void publish(String data) {
if (!isConnected()) {
if (uri == null) {
throw new ConnectorException("No uri provided for connector");
throw new ConnectorException(ERROR_MESSAGE);
}
connect(uri);
}
Expand Down

0 comments on commit d1af870

Please sign in to comment.