Revision 10484
Added by Jing Tao almost 7 years ago
src/edu/ucsb/nceas/metacat/restservice/D1ResourceHandler.java | ||
---|---|---|
48 | 48 |
import org.dataone.portal.PortalCertificateManager; |
49 | 49 |
import org.dataone.service.exceptions.BaseException; |
50 | 50 |
import org.dataone.service.exceptions.InvalidRequest; |
51 |
import org.dataone.service.exceptions.NotFound; |
|
51 | 52 |
import org.dataone.service.exceptions.ServiceFailure; |
52 | 53 |
import org.dataone.service.types.v1.Group; |
53 | 54 |
import org.dataone.service.types.v1.Person; |
... | ... | |
529 | 530 |
// TODO: Use content negotiation to determine which return format to use |
530 | 531 |
response.setContentType("text/xml"); |
531 | 532 |
response.setStatus(e.getCode()); |
532 |
|
|
533 |
logMetacat.error("D1ResourceHandler: Serializing exception with code " + e.getCode() + ": " + e.getMessage(), e); |
|
533 |
if( e instanceof NotFound) { |
|
534 |
logMetacat.info("D1ResourceHandler: Serializing exception with code " + e.getCode() + ": " + e.getMessage()); |
|
535 |
} else { |
|
536 |
logMetacat.error("D1ResourceHandler: Serializing exception with code " + e.getCode() + ": " + e.getMessage(), e); |
|
537 |
} |
|
534 | 538 |
//e.printStackTrace(); |
535 | 539 |
|
536 | 540 |
try { |
Also available in: Unified diff
When it serialize the NotFound exception, it will use info debug level and not print out the stack trace.