Use of "catch (...)" should be reduced or mitigated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
In Progress
|
High
|
Paul J. Lucas |
Bug Description
At various places in the code, the "catch" clause of a try/catch is "catch (...)". In many cases, this isn't handled as well as it ought to be. For example:
catch ( ZorbaException const &e ) {
// do something
}
catch ( ... ) {
// do something more drastic
}
At the very least, an additional "catch" clause should be inserted like:
catch ( ZorbaException const &e ) {
// do something
}
catch ( std::exception const &e ) {
// do something with e.what()
}
catch ( ... ) {
// do something more drastic
}
so that at least the information contained in the "what()" message can be preserved.
Another case is in loader_fast.cpp, FastXmlLoader:
Related branches
- Chris Hillery: Needs Information
- Paul J. Lucas: Approve
-
Diff: 1283 lines (+397/-393)16 files modifiedsrc/api/xqueryimpl.cpp (+3/-17)
src/capi/cdynamic_context.cpp (+1/-4)
src/capi/cexpression.cpp (+1/-4)
src/capi/cimplementation.cpp (+1/-4)
src/capi/csequence.cpp (+1/-4)
src/capi/cstatic_context.cpp (+1/-4)
src/context/default_url_resolvers.cpp (+6/-0)
src/runtime/debug/debug_iterator_impl.cpp (+11/-18)
src/runtime/indexing/doc_indexer.cpp (+1/-3)
src/store/naive/loader_dtd.cpp (+118/-8)
src/store/naive/loader_fast.cpp (+51/-89)
src/store/naive/node_items.cpp (+13/-27)
src/store/naive/node_updates.cpp (+179/-186)
src/store/naive/pul_primitives.cpp (+5/-1)
src/store/naive/store.cpp (+2/-3)
src/types/schema/schema.cpp (+3/-21)
- Cezar Andrei: Approve
- Paul J. Lucas: Pending requested
-
Diff: 287 lines (+131/-2)2 files modifiedsrc/store/naive/loader_dtd.cpp (+69/-0)
src/store/naive/loader_fast.cpp (+62/-2)
Changed in zorba: | |
status: | New → In Progress |
Changed in zorba: | |
milestone: | none → 2.9 |
Changed in zorba: | |
importance: | Undecided → Medium |
Changed in zorba: | |
assignee: | Cezar Andrei (cezar-andrei) → Paul J. Lucas (paul-lucas) |
Changed in zorba: | |
assignee: | Cezar Andrei (cezar-andrei) → Paul J. Lucas (paul-lucas) |
Changed in zorba: | |
assignee: | Cezar Andrei (cezar-andrei) → Paul J. Lucas (paul-lucas) |
Changed in zorba: | |
milestone: | 2.9 → 3.0 |
Changed in zorba: | |
importance: | Medium → High |
Cezar, can you take a look at the FastXmlLoader issue Paul mentions?