Questions tagged [exceptionhandler]
186 questions
3
votes
1 answer
p:commandButton don't redirect when ExternalContext#redirect() is called
Here's an example button which can throw an exception:
In my…

Helija
- 133
- 2
- 9
2
votes
1 answer
.NET 7 Avoid logging exception thrown by cancellation token in database query
I'm developing an ASP.NET 7.0 application. This app makes requests to a database with a cancellation token passed to it.
public async Task OnGetAsync(CancellationToken cancellationToken)
{
var ls = await _db.MyTable
…

S. Delsad
- 23
- 4
2
votes
0 answers
Use of @ResponseStatus interferes with @Transactional rollback behavior
I've found that when I use the @ResponseStatus annotation on an unchecked error declaration, as discussed in this Baeldung article, it invalidates the @Transactional rollback behavior I'm relying on in my service layer.
How can I translate unchecked…

Peter Alfvin
- 28,599
- 8
- 68
- 106
2
votes
2 answers
Error-page in WEB-INF not found when using PrimeExceptionHandler
In my web.xml, I have
javax.faces.application.ViewExpiredException
/WEB-INF/errorpages/expired.xhtml
But if a ViewExpiredException is thrown (Non - AJAX), it…

grigouille
- 511
- 3
- 14
2
votes
1 answer
Can I get all validation errors in spring boot web application?
I have a pojo like below (please assume a controller and rest of the code. Application is in Spring boot):
@Getter @Setter
@AllArgsConstructor @NoArgsConstructor
public class User {
@NotBlank(message = "userName is blank")
private String…

asvni
- 373
- 3
- 10
2
votes
3 answers
Spring - Using an exception handler from an external jar for 2 other projects
I have 2 projects that have the same exceptions and use the same exception handler.
So all of the exceptions and the exception handler were moved to an external module.
The exceptions are imported just fine, but the exception handler does not seem…

Rivfader
- 59
- 6
2
votes
2 answers
Modelling exceptions & Handling http codes inside a server application
I am working on a spring boot application , which makes http calls to multiple external services, aggregates and returns the response to the frontend.
Here's the current structure of my project:
RouteController -> Handler ->…

matrixguy
- 286
- 1
- 6
- 30
2
votes
3 answers
UML Exception Handler Notation
What is the notation for an Exception Handler in UML activity diagrams? Is it just the lightning bolt? Or more than that?
According to the specification v2.5.1 page 404:
An ExceptionHandler is shown by drawing a “lightning bolt” symbol from the…

muued
- 1,666
- 13
- 25
2
votes
0 answers
need to get the actual request body content from WebRequest while overriding handleMethodArgumentNotValid method in ResponseEntityExceptionHandler
I want the request body content from WebRequest when I override the below method in my ExceptionHandler which extends ResponseEntityExceptionHandler.
protected org.springframework.http.ResponseEntity handleMethodArgumentNotValid(
…

Somu
- 71
- 1
- 1
- 7
2
votes
1 answer
Override gem module in initializers
I have a specific gem gem installed and I wish to override the following method in the gem's module:
def trace
exception.backtrace.join("\n")
end
I need to change exception.backtrace.join("\n") to exception.backtrace.join("
") I don't want…
") I don't want…

Ben
- 2,957
- 2
- 27
- 55
2
votes
2 answers
How to ignore an @ExceptionHandler from a dependency?
I'm having a problem trying to return a "ResponseEntity" in one of my methods which is located in a custom exception handler (annotated with @ExceptionHandler and @ControllerAdvice), I'm calling this method from a "doOnError" (rxjava), but my…

Marco Marchetti
- 187
- 1
- 6
- 14
2
votes
0 answers
Exception Handler with different return type, same error
So, this is my first time asking in this forum and I hope i you guys can help me, sorry if my post has similar topics with others.
My question is, if i have this exception handler (Spring-mvc) :
@ExceptionHandler(value = MyException.class)
…

Kevin Christian
- 103
- 1
- 1
- 6
2
votes
1 answer
More than one table found in namespace (, ) - with Spring, Hibernate and JPA
I’m using Spring 4 & Hibernate 5 with JPA and and Oracle Database, i have checked all my code and there is only one entity and a single table with the name LANGUE, My project still refuses to compile because of this error, Can someone help me please…

benito
- 655
- 6
- 12
2
votes
1 answer
Change in Angular2 RC5 ExceptionHandler?
I'm migrating my Angular2 code to RC5 and can't figure out how to wire up my exception handling. In the RC4, it was part of the bootstrapping process in Main.ts:
bootstrap(MyApp, [{provide: ExceptionHandler, useClass: GlobalExceptionHandler}])
But…

ibejo
- 67
- 1
- 6
2
votes
0 answers
How to remove the background in Exception Handler gem in Rails 5?
I am trying to add this gem https://github.com/richpeck/exception_handler to my website.
This is my config/application.rb
config.exception_handler = {
dev: true,
db: false, #-> defaults to :errors if true, else use…

LovingRails
- 1,565
- 2
- 16
- 30