mukesh154 opened a new issue, #22655: URL: https://github.com/apache/pulsar/issues/22655
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Motivation In the Pulsar-Shell environment of Luna 3.x, an exception specifically `org.apache.pulsar.shell.PulsarShell$InterruptShellException` occurs, disrupting the execution flow when a user presses Ctrl-C during shell operation and it prints the below stack trace. ``` ^CException in thread "SIGINT handler" org.apache.pulsar.shell.PulsarShell$InterruptShellException at org.apache.pulsar.shell.PulsarShell.lambda$run$2(PulsarShell.java:230) at org.jline.terminal.impl.AbstractTerminal.raise(AbstractTerminal.java:89) at org.jline.terminal.impl.PosixSysTerminal.lambda$handle$1(PosixSysTerminal.java:65) at org.jline.utils.Signals.lambda$register$1(Signals.java:53) at jdk.proxy2/jdk.proxy2.$Proxy3.handle(Unknown Source) at jdk.unsupported/sun.misc.Signal$InternalMiscHandler.handle(Signal.java:198) at java.base/jdk.internal.misc.Signal$1.run(Signal.java:219) at java.base/java.lang.Thread.run(Thread.java:840) ``` ### Solution The problem is to simply NOT log the the full stack trace. To deal with this interruption smoothly, developers can use special tools for handling problems. They can wrap specific parts of their code in a safety net called a try-catch structure. This helps them catch and deal with the issue caused by pressing Ctrl-C, without showing all the confusing details(stack trace). Instead, they can show a clear message saying the operation was stopped using Ctrl-C. ### Alternatives _No response_ ### Anything else? _No response_ ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
