Skip to content

Commit

Permalink
Merge pull request #743 from vonZeppelin/master
Browse files Browse the repository at this point in the history
Spark.halt() method signature should correspond to Service.halt()
  • Loading branch information
perwendel committed Jan 10, 2017
2 parents 14ac271 + e7713b5 commit 7d36959
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/spark/Spark.java
Expand Up @@ -870,8 +870,8 @@ public static void exception(Class<? extends Exception> exceptionClass, Exceptio
* NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise
* halt will not work
*/
public static void halt() {
getInstance().halt();
public static HaltException halt() {
throw getInstance().halt();
}

/**
Expand All @@ -881,8 +881,8 @@ public static void halt() {
*
* @param status the status code
*/
public static void halt(int status) {
getInstance().halt(status);
public static HaltException halt(int status) {
throw getInstance().halt(status);
}

/**
Expand All @@ -892,8 +892,8 @@ public static void halt(int status) {
*
* @param body The body content
*/
public static void halt(String body) {
getInstance().halt(body);
public static HaltException halt(String body) {
throw getInstance().halt(body);
}

/**
Expand All @@ -904,8 +904,8 @@ public static void halt(String body) {
* @param status The status code
* @param body The body content
*/
public static void halt(int status, String body) {
getInstance().halt(status, body);
public static HaltException halt(int status, String body) {
throw getInstance().halt(status, body);
}

/**
Expand Down

0 comments on commit 7d36959

Please sign in to comment.