Feature #6184
closedknow your dbo class on null
0%
Description
It would be handy to know which Dbo class it is that's reporting that it does not have an active transaction. So I hacked and tested this in to the library.
MP Updated by Mark Petryk almost 9 years ago
Rather, this reports that a ptr object is null, which is helpful... but, as far as "no active transaction", something like this similar there would be helpful as well.
RS Updated by Roel Standaert over 8 years ago
- Target version changed from 3.3.10 to 3.3.11
RS Updated by Roel Standaert about 8 years ago
- Status changed from New to Closed
MP Updated by Mark Petryk about 8 years ago
I would do it on these two as well:
453 template ·
454 const C& ptr::operator*() const·
455 {·
456 if (obj_)·
457 return *obj_->obj();·
458 else·
459 throw Exception("Wt::Dbo::ptr: null dereference");·
460 }·
461 ·
462 template ·
463 typename ptr::mutator ptr::modify() const·
464 {·
465 if (obj_)·
466 return mutator(obj_);·
467 else·
468 throw Exception("Wt::Dbo::ptr: null dereference");·
469 }·
MP Updated by Mark Petryk about 8 years ago
This is what I see now:
[2018-Sep-07 09:13:25.784] 22392 [/demo kY7zk9D9Vz7rBBay] [error] "Wt: error during event handling: Wt::Dbo::ptr: null dereference"
[2018-Sep-07 09:13:25.784] 22392 [/demo kY7zk9D9Vz7rBBay] [error] "Wt: fatal error: Wt::Dbo::ptr: null dereference"
This is perfect!