Fix for when msgbase with pages cannot be found/opened

This commit is contained in:
Deon George 2023-12-30 00:02:48 +11:00
parent 00a1ad795d
commit de04ec11ee

View File

@ -1093,21 +1093,23 @@ function Page(debug) {
}
this.load = function(page) {
var mb = new MsgBase(FRAMES_MSG_BASE);
var headers;
var mb = new MsgBase(FRAMES_MSG_BASE);
try {
if (mb.open()) {
headers = mb.get_all_msg_headers(false,false) || [];
} else {
log(LOG_ERROR,code+' cannot be opened:'+mb.error);
log(LOG_ERROR,'! ['+FRAMES_MSG_BASE+'] cannot be opened ['+mb.error+']');
return false;
}
// @todo It appears if the message base doesnt exist, we dont error?
} catch (e) {
log(LOG_ERROR,code+' cannot be opened:'+e.message);
log(LOG_ERROR,'! ['+FRAMES_MSG_BASE+'] cannot be opened ['+e.message+']');
return false;
}