ENH: error capture for wrong session length

Should prevent bugs like in #284