Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autopsy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Autopsy
Commits
d0683fa0
Commit
d0683fa0
authored
9 years ago
by
Richard Cordovano
Browse files
Options
Downloads
Patches
Plain Diff
Improve Core Installer error handling
parent
1a908d10
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java
+17
-11
17 additions, 11 deletions
Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java
with
17 additions
and
11 deletions
Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java
+
17
−
11
View file @
d0683fa0
...
...
@@ -83,14 +83,14 @@ public void restored() {
try
{
Case
.
open
(
caseFile
);
}
catch
(
Exception
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
"Error opening case
"
,
ex
);
//NON-NLS
logger
.
log
(
Level
.
SEVERE
,
String
.
format
(
"Error opening case
with metadata file path %s"
,
caseFile
)
,
ex
);
//NON-NLS
}
}).
start
();
return
;
}
}
}
Case
.
invokeStartupDialog
();
// bring up the startup dialog
Case
.
invokeStartupDialog
();
});
}
...
...
@@ -103,12 +103,19 @@ public void uninstalled() {
@Override
public
void
close
()
{
new
Thread
(()
->
{
String
caseDirName
=
null
;
try
{
if
(
Case
.
isCaseOpen
())
{
Case
.
getCurrentCase
().
closeCase
();
Case
currentCase
=
Case
.
getCurrentCase
();
caseDirName
=
currentCase
.
getCaseDirectory
();
currentCase
.
closeCase
();
}
}
catch
(
CaseActionException
|
IllegalStateException
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
"Error closing case"
,
ex
);
//NON-NLS
}
catch
(
CaseActionException
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
String
.
format
(
"Error closing case with case directory %s"
,
(
null
!=
caseDirName
?
caseDirName
:
"?"
)),
ex
);
//NON-NLS
}
catch
(
IllegalStateException
ignored
)
{
/*
* No current case. Case.isCaseOpen is not reliable.
*/
}
}).
start
();
}
...
...
@@ -128,7 +135,7 @@ private void setOSXLookAndFeel() {
try
{
UIManager
.
setLookAndFeel
(
UIManager
.
getSystemLookAndFeelClassName
());
}
catch
(
ClassNotFoundException
|
InstantiationException
|
IllegalAccessException
|
UnsupportedLookAndFeelException
ex
)
{
logger
.
log
(
Level
.
WARNING
,
"
Unable to set theme.
"
,
ex
);
//NON-NLS
logger
.
log
(
Level
.
WARNING
,
"
Error setting OS-X look-and-feel
"
,
ex
);
//NON-NLS
}
// Store the keys that deal with menu items
...
...
@@ -138,20 +145,19 @@ private void setOSXLookAndFeel() {
uiEntries
.
put
(
key
,
UIManager
.
get
(
key
));
}
// Use Metal if available
// Use Metal if available
.
for
(
LookAndFeelInfo
info
:
UIManager
.
getInstalledLookAndFeels
())
{
if
(
"Nimbus"
.
equals
(
info
.
getName
()))
{
//NON-NLS
try
{
UIManager
.
setLookAndFeel
(
info
.
getClassName
());
}
catch
(
ClassNotFoundException
|
InstantiationException
|
IllegalAccessException
|
UnsupportedLookAndFeelException
ex
)
{
logger
.
log
(
Level
.
WARNING
,
"Unable to set theme. "
,
ex
);
//NON-NLS
}
catch
(
ClassNotFoundException
|
InstantiationException
|
IllegalAccessException
|
UnsupportedLookAndFeelException
ex
)
{
logger
.
log
(
Level
.
WARNING
,
"Error setting OS-X look-and-feel"
,
ex
);
//NON-NLS
}
break
;
}
}
// Overwrite the Metal menu item keys to use the Aqua versions
// Overwrite the Metal menu item keys to use the Aqua versions
.
uiEntries
.
entrySet
().
stream
().
forEach
((
entry
)
->
{
UIManager
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment