|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
33 | 33 | import org.graalvm.visualvm.heapviewer.HeapViewer;
|
34 | 34 | import java.awt.BorderLayout;
|
35 | 35 | import java.io.File;
|
36 |
| -import java.io.FileNotFoundException; |
37 | 36 | import java.io.IOException;
|
| 37 | +import java.util.logging.Level; |
38 | 38 | import java.util.logging.Logger;
|
39 | 39 | import javax.swing.JLabel;
|
40 | 40 | import javax.swing.JPanel;
|
@@ -135,10 +135,14 @@ public void run() {
|
135 | 135 | contentsPanel.revalidate();
|
136 | 136 | contentsPanel.repaint();
|
137 | 137 | } });
|
138 |
| - } catch (FileNotFoundException ex) { |
139 |
| - LOGGER.throwing(HeapDumpView.class.getName(), "loadHeap", ex); // NOI18N |
140 |
| - } catch (IOException ex) { |
| 138 | + } catch (final IOException ex) { |
| 139 | + SwingUtilities.invokeLater(new Runnable() { public void run() { |
| 140 | + progressLabel.setText(NbBundle.getMessage(HeapDumpView.class, "LBL_Loading_Heap_Dump_failed2", ex.getMessage())); |
| 141 | + contentsPanel.revalidate(); |
| 142 | + contentsPanel.repaint(); |
| 143 | + } }); |
141 | 144 | LOGGER.throwing(HeapDumpView.class.getName(), "loadHeap", ex); // NOI18N
|
| 145 | + LOGGER.log(Level.INFO, "Failed to load heap dump", ex); // NOI18N |
142 | 146 | }
|
143 | 147 | }
|
144 | 148 | });
|
|
0 commit comments