-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decorate stacktraces in dev mode error page #37034
Conversation
geoand
commented
Nov 13, 2023
•
edited
Loading
edited
- Closes: provide source file context for exception message #37002
This comment has been minimized.
This comment has been minimized.
@phillip-kruger you wanna take this in? |
This comment has been minimized.
This comment has been minimized.
🎉 |
This comment has been minimized.
This comment has been minimized.
this really works awesome. one thing I noticed was that with some compile errors I seem to get ansi characters in the output? with this: package org.acme;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
@Path("/hello")
public class GreetingResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
inter var;
// if (System.currentTimeMillis()!=0) throw new RuntimeException();
return "Hello from Quarkus REST";
}
} I got:
but package org.acme;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
@Path("/hello")
public class GreetingResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
if (System.currentTimeMillis()!=0) throw new RuntimeException();
return "Hello from Quarkus REST";
}
} gave me clean/no ansi:
also - should we have original stacktrace link provide the true original without the injected locations? |
for future - would be great to have those lines with know locations clickable to open in IDE :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this; if the ansi code is known issue already we should merge this as its really helpful IMO.
the other suggestions are improvements on what is already nice.
a56eff5
to
b043849
Compare
@maxandersen I can not recreate the encoding issue ... |
This comment has been minimized.
This comment has been minimized.
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/HttpConfiguration.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we don't have options for disabling the reversal of stacktraces and there are security issues for prod - I suggest to make this pr have this feature enabled always in devmode and only add a option to disable in dev and enable in prod as a follow up if we get feedback/usecase on it.
Signed-off-by: Phillip Kruger <[email protected]>
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm