mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 03:24:55 +00:00
Exception texts via NbBundle.getMessage
This commit is contained in:
parent
c9f2863e27
commit
b47a3a05ad
@ -20,3 +20,5 @@ ServicesMonitor.restoredService.notify.title=Collaboration Service Restored
|
|||||||
ServicesMonitor.restoredDbService.notify.msg=Connection to remote database server restored
|
ServicesMonitor.restoredDbService.notify.msg=Connection to remote database server restored
|
||||||
ServicesMonitor.restoredSolrService.notify.msg=Connection to remote keyword search server restored
|
ServicesMonitor.restoredSolrService.notify.msg=Connection to remote keyword search server restored
|
||||||
ServicesMonitor.restoredMessageService.notify.msg=Connection to messaging server restored
|
ServicesMonitor.restoredMessageService.notify.msg=Connection to messaging server restored
|
||||||
|
ServicesMonitor.nullServiceName.excepton.txt=Requested service name is null
|
||||||
|
ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is unknown
|
@ -153,14 +153,13 @@ public class ServicesMonitor {
|
|||||||
public String getServiceStatus(String service) throws UnknownServiceException {
|
public String getServiceStatus(String service) throws UnknownServiceException {
|
||||||
|
|
||||||
if (service == null) {
|
if (service == null) {
|
||||||
// TODO NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existNotDir"));
|
throw new UnknownServiceException(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.nullServiceName.excepton.txt"));
|
||||||
throw new UnknownServiceException("Requested service name is null");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String status = this.statusByService.get(service);
|
String status = this.statusByService.get(service);
|
||||||
if (status == null) {
|
if (status == null) {
|
||||||
// no such service
|
// no such service
|
||||||
throw new UnknownServiceException("Requested service name " + service + " is unknown");
|
throw new UnknownServiceException(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.unknownServiceName.excepton.txt"));
|
||||||
|
|
||||||
} else if (status.equals(ServiceStatus.UNKNOWN.toString())) {
|
} else if (status.equals(ServiceStatus.UNKNOWN.toString())) {
|
||||||
// status for the service is not known. This is likely because we haven't
|
// status for the service is not known. This is likely because we haven't
|
||||||
|
Loading…
x
Reference in New Issue
Block a user