Skip to content

Commit 4d248bc

Browse files
handling error of stop streaming button
1 parent 4b4d803 commit 4d248bc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.example.treaders.ExceptionHandling;
2+
3+
import org.springframework.web.bind.annotation.ExceptionHandler;
4+
import org.springframework.web.bind.annotation.RestControllerAdvice;
5+
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
6+
7+
import java.io.IOException;
8+
9+
@RestControllerAdvice
10+
public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
11+
@ExceptionHandler(IOException.class)
12+
public void handleIOException(IOException ex) {
13+
// Log the exception or handle it as per your application's requirements
14+
// For example:
15+
System.err.println("IOException occurred: " + ex.getMessage());
16+
}
17+
}

0 commit comments

Comments
 (0)