Return (limtype, repval, errval1, errval2). Like m_liminfo, but also
    provides error bar information for values that have it.

def errinfo(msmt):
    """Return (limtype, repval, errval1, errval2). Like m_liminfo, but also
    provides error bar information for values that have it."""

    if isinstance(msmt, Textual):
        msmt = msmt.unwrap()

    if np.isscalar(msmt):
        return 0, msmt, msmt, msmt

    if isinstance(msmt, Uval):
        rep, plus1, minus1 = msmt.repvals(uval_default_repval_method)
        return 0, rep, plus1, minus1

    if isinstance(msmt, Lval):
        return limtype(msmt), msmt.value, msmt.value, msmt.value

    raise ValueError('don\'t know how to treat %r as a measurement' % msmt)