Skip to content

Commit 6357569

Browse files
committed
Merge pull request #159 from dgets/mbase-pointer-debugging
More debugging in search of wtf for issue #140; turns out the whole thing was just Ddoctest's message pointers being corrupted.
2 parents dc5b81d + a57d7d2 commit 6357569

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

load/dmbase.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,18 +571,24 @@ msg_base = {
571571
//take care of this in calling code
572572
//mBase.close();
573573
mBase = new MsgBase(mb);
574-
mBase.open();
574+
try {
575+
mBase.open();
576+
} catch (e) {
577+
console.putmsg(red + "Ername: " + e.name + "mBase.error: " +
578+
e.message + "\n");
579+
throw new dDocException("openNewMBase() Error", e.message, 1);
580+
}
581+
575582
if (userSettings.debug.message_scan) {
576583
console.putmsg(red + "Opened: " + mb +
577584
" allegedly . . .\n");
578-
console.putmsg(red + "mBase.error: " + mBase.error + "\n");
579585
}
580586
} catch (e) {
581587
console.putmsg(red + "Error opening new mBase:\n"
582588
+ e.toString() + "\n");
583589
log("Error skipping through scanSub(): " +
584590
e.toString());
585-
return null; //this is where we want to throw an exception instead
591+
throw new dDocException("openNewMBase() Error", e.message, 2);
586592
}
587593

588594
return mBase;
@@ -625,8 +631,12 @@ msg_base = {
625631
}
626632

627633
tmpPtr = sBoard.scan_ptr;
634+
//tmpPtr = sBoard.ptridx;
635+
//tmpPtr = mBase.cfg.ptridx;
628636
if (userSettings.debug.message_scan) {
629637
console.putmsg("sBoard.scan_ptr = " + sBoard.scan_ptr + "\n");
638+
console.putmsg("sBoard.ptridx = " + sBoard.ptridx + "\n");
639+
console.putmsg("mBase.cfg.ptridx = " + mBase.cfg.ptridx + "\n");
630640
console.putmsg("mBase.first_msg = " + mBase.first_msg + "\n");
631641
console.putmsg("mBase.total_msgs = " + mBase.total_msgs + "\n");
632642
console.putmsg("mBase.last_msg = " + mBase.last_msg + "\n");

0 commit comments

Comments
 (0)