Added Log information
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-sdmx-import-widget@85040 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e3fc6ee4be
commit
3cd17f60a9
|
@ -62,21 +62,7 @@ public class OperationProgressUpdater extends Timer {
|
|||
break;
|
||||
case FAILED:
|
||||
cancel();
|
||||
Log.info("Import SDMX Failed");
|
||||
AlertMessageBox d = new AlertMessageBox("ImportSDMX Failed",
|
||||
result.getError().getLocalizedMessage());
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
@Override
|
||||
public void onHide(HideEvent event) {
|
||||
//
|
||||
}
|
||||
|
||||
});
|
||||
d.show();
|
||||
fireOperationFailed(result.getError(),
|
||||
"Failed Client Library Import",
|
||||
result.getStatusDescription());
|
||||
errorMessage(result);
|
||||
break;
|
||||
case SUCCEDED:
|
||||
cancel();
|
||||
|
@ -97,6 +83,37 @@ public class OperationProgressUpdater extends Timer {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void errorMessage(SDMXImportMonitor result) {
|
||||
Log.info("SDMX Import Failed");
|
||||
Throwable th = null;
|
||||
String failure = null;
|
||||
String details = null;
|
||||
if (result.getError() != null) {
|
||||
th = result.getError();
|
||||
failure = "Failed Client Library Import";
|
||||
details = result.getError().getLocalizedMessage();
|
||||
} else {
|
||||
th = new Throwable("Failed");
|
||||
failure = "Failed Client Library Import";
|
||||
details = "Error in import";
|
||||
}
|
||||
fireOperationFailed(th, failure, details);
|
||||
|
||||
AlertMessageBox d = new AlertMessageBox("Error in SDMX Import", details);
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
@Override
|
||||
public void onHide(HideEvent event) {
|
||||
//
|
||||
}
|
||||
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected String getStack(Throwable e) {
|
||||
String message = e.getLocalizedMessage() + " -> <br>";
|
||||
|
|
Loading…
Reference in New Issue