@@ -756,7 +756,7 @@ default long getRequestLength() {
756756 try {
757757 return parser (contentType ).parse (this , type .getType ());
758758 } catch (Exception x ) {
759- throw Throwing . sneakyThrow (x );
759+ throw Sneaky . propagate (x );
760760 }
761761 }
762762
@@ -783,7 +783,7 @@ default long getRequestLength() {
783783 try {
784784 return parser (contentType ).parse (this , type );
785785 } catch (Exception x ) {
786- throw Throwing . sneakyThrow (x );
786+ throw Sneaky . propagate (x );
787787 }
788788 }
789789
@@ -1027,7 +1027,7 @@ default long getRequestLength() {
10271027 send (bytes );
10281028 return this ;
10291029 } catch (Exception x ) {
1030- throw Throwing . sneakyThrow (x );
1030+ throw Sneaky . propagate (x );
10311031 }
10321032 }
10331033
@@ -1058,7 +1058,7 @@ default long getRequestLength() {
10581058 * @throws Exception Is something goes wrong.
10591059 */
10601060 default @ Nonnull Context responseStream (@ Nonnull MediaType contentType ,
1061- @ Nonnull Throwing .Consumer <OutputStream > consumer ) throws Exception {
1061+ @ Nonnull Sneaky .Consumer <OutputStream > consumer ) throws Exception {
10621062 setResponseType (contentType );
10631063 return responseStream (consumer );
10641064 }
@@ -1070,7 +1070,7 @@ default long getRequestLength() {
10701070 * @return HTTP channel as output stream. Usually for chunked responses.
10711071 * @throws Exception Is something goes wrong.
10721072 */
1073- default @ Nonnull Context responseStream (@ Nonnull Throwing .Consumer <OutputStream > consumer )
1073+ default @ Nonnull Context responseStream (@ Nonnull Sneaky .Consumer <OutputStream > consumer )
10741074 throws Exception {
10751075 try (OutputStream out = responseStream ()) {
10761076 consumer .accept (out );
@@ -1120,7 +1120,7 @@ default long getRequestLength() {
11201120 * @return This context.
11211121 * @throws Exception Is something goes wrong.
11221122 */
1123- default @ Nonnull Context responseWriter (@ Nonnull Throwing .Consumer <PrintWriter > consumer )
1123+ default @ Nonnull Context responseWriter (@ Nonnull Sneaky .Consumer <PrintWriter > consumer )
11241124 throws Exception {
11251125 return responseWriter (MediaType .text , consumer );
11261126 }
@@ -1134,7 +1134,7 @@ default long getRequestLength() {
11341134 * @throws Exception Is something goes wrong.
11351135 */
11361136 default @ Nonnull Context responseWriter (@ Nonnull MediaType contentType ,
1137- @ Nonnull Throwing .Consumer <PrintWriter > consumer ) throws Exception {
1137+ @ Nonnull Sneaky .Consumer <PrintWriter > consumer ) throws Exception {
11381138 return responseWriter (contentType , contentType .getCharset (), consumer );
11391139 }
11401140
@@ -1148,7 +1148,7 @@ default long getRequestLength() {
11481148 * @throws Exception Is something goes wrong.
11491149 */
11501150 default @ Nonnull Context responseWriter (@ Nonnull MediaType contentType , @ Nullable Charset charset ,
1151- @ Nonnull Throwing .Consumer <PrintWriter > consumer ) throws Exception {
1151+ @ Nonnull Sneaky .Consumer <PrintWriter > consumer ) throws Exception {
11521152 try (PrintWriter writer = responseWriter (contentType , charset )) {
11531153 consumer .accept (writer );
11541154 }
@@ -1271,7 +1271,7 @@ default long getRequestLength() {
12711271 setDefaultResponseType (MediaType .byFile (file ));
12721272 return send (FileChannel .open (file ));
12731273 } catch (IOException x ) {
1274- throw Throwing . sneakyThrow (x );
1274+ throw Sneaky . propagate (x );
12751275 }
12761276 }
12771277
@@ -1318,8 +1318,8 @@ default long getRequestLength() {
13181318 .error ("error handler resulted in exception {} {}" , getMethod (), pathString (), x );
13191319 }
13201320 /** rethrow fatal exceptions: */
1321- if (Throwing .isFatal (cause )) {
1322- throw Throwing . sneakyThrow (cause );
1321+ if (Sneaky .isFatal (cause )) {
1322+ throw Sneaky . propagate (cause );
13231323 }
13241324 return this ;
13251325 }
0 commit comments