Revision 675
Added by berkley about 23 years ago
DocumentImpl.java | ||
---|---|---|
111 | 111 |
} catch (McdbException ex) { |
112 | 112 |
throw ex; |
113 | 113 |
} catch (Throwable t) { |
114 |
throw new McdbException("Error reading document " + docid + "."); |
|
114 |
throw new McdbException("Error reading document from " + |
|
115 |
"DocumentImpl.DocumentImpl: " + docid); |
|
115 | 116 |
} |
116 | 117 |
} |
117 | 118 |
|
... | ... | |
473 | 474 |
} |
474 | 475 |
catch(Exception e) |
475 | 476 |
{ |
476 |
System.out.println("error in getDocumentInfo: " + e.getMessage()); |
|
477 |
System.out.println("error in DocumentImpl.getDocumentInfo: " + |
|
478 |
e.getMessage()); |
|
477 | 479 |
} |
478 | 480 |
|
479 | 481 |
//deal with the key words here. |
... | ... | |
514 | 516 |
//this.publicaccess = rs.getInt(10); |
515 | 517 |
this.rev = rs.getInt(10); |
516 | 518 |
} |
517 |
pstmt.close(); |
|
518 | 519 |
|
519 | 520 |
if (this.doctype != null) { |
520 | 521 |
pstmt = |
... | ... | |
530 | 531 |
if (tableHasRows) { |
531 | 532 |
this.system_id = rs.getString(1); |
532 | 533 |
} |
533 |
pstmt.close(); |
|
534 |
//pstmt.close();
|
|
534 | 535 |
} |
535 | 536 |
} catch (SQLException e) { |
536 |
System.out.println("error in getDocumentInfo: " + e.getMessage()); |
|
537 |
System.out.println("error in DocumentImpl.getDocumentInfo: " + |
|
538 |
e.getMessage()); |
|
537 | 539 |
e.printStackTrace(System.out); |
538 |
throw new McdbException("Error accessing database connection.", e); |
|
540 |
throw new McdbException("Error accessing database connection in " + |
|
541 |
"DocumentImpl.getDocumentInfo: ", e); |
|
539 | 542 |
} |
540 | 543 |
|
541 | 544 |
if (this.docname == null) { |
... | ... | |
595 | 598 |
pstmt.close(); |
596 | 599 |
|
597 | 600 |
} catch (SQLException e) { |
598 |
throw new McdbException("Error accessing database connection.", e); |
|
601 |
throw new McdbException("Error accessing database connection from " + |
|
602 |
"DocumentImpl.getNodeRecordList ", e); |
|
599 | 603 |
} |
600 | 604 |
|
601 | 605 |
if (nodeRecordList != null) { |
... | ... | |
651 | 655 |
pstmt = conn.prepareStatement( |
652 | 656 |
"DELETE FROM xml_index WHERE docid='" + this.docid + "'"); |
653 | 657 |
pstmt.execute(); |
654 |
pstmt.close(); |
|
658 |
//pstmt.close();
|
|
655 | 659 |
|
656 | 660 |
// Update the new document to reflect the new node tree |
657 | 661 |
pstmt = conn.prepareStatement( |
... | ... | |
713 | 717 |
pstmt.execute(); |
714 | 718 |
pstmt.close(); |
715 | 719 |
} catch (SQLException e) { |
716 |
System.out.println(e.getMessage()); |
|
720 |
System.out.println("Error in DocumentImpl.setTitle: " + e.getMessage());
|
|
717 | 721 |
} |
718 | 722 |
} |
719 | 723 |
|
Also available in: Unified diff
added precise location information (class.method) to each catch statement so that errors are more easily traced.