Added a custom exception of kind ZenodoException
This commit is contained in:
parent
5917f8de5e
commit
3b5d414e31
|
@ -165,8 +165,15 @@ public class CkanToZenodoPublisherServiceImpl extends RemoteServiceServlet imple
|
|||
zenodoItem.setName(item.getItemId());
|
||||
|
||||
LOG.debug("Returning item: "+zenodoItem);
|
||||
|
||||
return zenodoItem;
|
||||
|
||||
} catch (ZenodoException e) {
|
||||
String error = ZenodoException.class.getSimpleName()+" on converting the catalogue item with id: "+item.getItemId();
|
||||
LOG.error(error, e);
|
||||
String clientError = String.format("%s. %s", error, e.getMessage());
|
||||
throw new Exception(clientError);
|
||||
|
||||
} catch (Exception e) {
|
||||
String error = "Error on converting the catalogue item with id: "+item.getItemId();
|
||||
LOG.error(error, e);
|
||||
|
|
Loading…
Reference in New Issue