You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/08/15 16:58:22 UTC

[GitHub] [netbeans] neilcsmith-net commented on a diff in pull request #4490: Exception reporter improvments

neilcsmith-net commented on code in PR #4490:
URL: https://github.com/apache/netbeans/pull/4490#discussion_r945948080


##########
platform/o.n.core/src/org/netbeans/core/NotifyExcPanel.java:
##########
@@ -484,32 +491,41 @@ public void run() {
                 }
             } else {
                 ResourceBundle curBundle = NbBundle.getBundle (NotifyExcPanel.class);
+                String message;
                 if (current.getSeverity() == Level.WARNING) {
                     // less scary message for warning level
-                    descriptor.setMessage (
-                        java.text.MessageFormat.format(
-                            curBundle.getString("NTF_ExceptionWarning"),
-                            new Object[] {
-                                current.getClassName ()
-                            }
-                        )
+                    message = MessageFormat.format(
+                        curBundle.getString("NTF_ExceptionWarning"),
+                        new Object[] { current.getClassName() }
                     );
                     title = curBundle.getString("NTF_ExceptionWarningTitle"); // NOI18N
                 } else {
-                    // emphasize user-non-friendly exceptions
-                    //      if (this.getMessage() == null || "".equals(this.getMessage())) { // NOI18N
-                    descriptor.setMessage (
-                        java.text.MessageFormat.format(
-                            curBundle.getString("NTF_ExceptionalException"),
-                            new Object[] {
-                                current.getClassName (),
-                                CLIOptions.getLogDir ()
-                            }
-                        )
+                    message = MessageFormat.format(
+                        curBundle.getString("NTF_ExceptionalException"),
+                        new Object[] { current.getClassName(), Paths.get(CLIOptions.getLogDir()).toUri() }

Review Comment:
   I'll check this on a Windows box.  To be pedantic, `file://C:...` would never be correct - should be one slash or three.



-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists