protected function triggerError($msg, $no) {
        // determine previous stack frame
        $backtrace = debug_backtrace();
        if ($this->chatty && isset($backtrace[1])) {
            $frame = $backtrace[1];
            $extra = " on line {$frame['line']} in file {$frame['file']}";
        } else {
            $extra = '';
        }
        trigger_error($msg . $extra, $no);
    }