Revision 10029
Added by Jing Tao about 8 years ago
src/edu/ucsb/nceas/metacat/MetacatHandler.java | ||
---|---|---|
1921 | 1921 |
output += this.ERROR; |
1922 | 1922 |
output += npe.getMessage(); |
1923 | 1923 |
output += this.ERRORCLOSE; |
1924 |
logMetacat.warn("MetacatHandler.handleInsertOrUpdateAction - " +
|
|
1924 |
logMetacat.error("MetacatHandler.handleInsertOrUpdateAction - " +
|
|
1925 | 1925 |
"Null pointer error when writing eml " + |
1926 | 1926 |
"document to the database: " + |
1927 | 1927 |
npe.getMessage()); |
... | ... | |
1941 | 1941 |
} |
1942 | 1942 |
|
1943 | 1943 |
if (qformat == null || qformat.equals("xml")) { |
1944 |
if(response != null) |
|
1944 |
if(response != null && out != null)
|
|
1945 | 1945 |
{ |
1946 | 1946 |
response.setContentType("text/xml"); |
1947 | 1947 |
out.println(output); |
Also available in: Unified diff
Add more checks to avoid a null exception.