Permalink
Browse files

Merge pull request #743 from vonZeppelin/master

Spark.halt() method signature should correspond to Service.halt()
  • Loading branch information...
2 parents 14ac271 + e7713b5 commit 7d36959321b40266433e508d87f366b79644f975 @perwendel committed on GitHub Jan 10, 2017
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/main/java/spark/Spark.java
@@ -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();
}
/**
@@ -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);
}
/**
@@ -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);
}
/**
@@ -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);
}
/**

0 comments on commit 7d36959

Please sign in to comment.