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;
|
break;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
cancel();
|
cancel();
|
||||||
Log.info("Import SDMX Failed");
|
errorMessage(result);
|
||||||
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());
|
|
||||||
break;
|
break;
|
||||||
case SUCCEDED:
|
case SUCCEDED:
|
||||||
cancel();
|
cancel();
|
||||||
|
@ -98,6 +84,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) {
|
protected String getStack(Throwable e) {
|
||||||
String message = e.getLocalizedMessage() + " -> <br>";
|
String message = e.getLocalizedMessage() + " -> <br>";
|
||||||
Throwable c = e.getCause();
|
Throwable c = e.getCause();
|
||||||
|
|
Loading…
Reference in New Issue