Process notification of the end of the document being reached. @exception SAXException if a parsing error is to be reported
()
| 1017 | * @exception SAXException if a parsing error is to be reported |
| 1018 | */ |
| 1019 | @Override |
| 1020 | public void endDocument() throws SAXException { |
| 1021 | |
| 1022 | if (saxLog.isTraceEnabled()) { |
| 1023 | if (getCount() > 1) { |
| 1024 | saxLog.trace("endDocument(): " + getCount() + " elements left"); |
| 1025 | } else { |
| 1026 | saxLog.trace("endDocument()"); |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | while (getCount() > 1) { |
| 1031 | pop(); |
| 1032 | } |
| 1033 | |
| 1034 | // Fire "finish" events for all defined rules |
| 1035 | for (Rule rule : getRules().rules()) { |
| 1036 | try { |
| 1037 | rule.finish(); |
| 1038 | } catch (Exception e) { |
| 1039 | log.error(sm.getString("digester.error.finish"), e); |
| 1040 | throw createSAXException(e); |
| 1041 | } catch (Error e) { |
| 1042 | log.error(sm.getString("digester.error.finish"), e); |
| 1043 | throw e; |
| 1044 | } |
| 1045 | } |
| 1046 | |
| 1047 | // Perform final cleanup |
| 1048 | clear(); |
| 1049 | |
| 1050 | } |
| 1051 | |
| 1052 | |
| 1053 | /** |
nothing calls this directly
no test coverage detected