Skip to content

m message error

Report an error.

example::

~$ m message error 'this is an error'
::error::this is an error
~$ echo $?
1

The procedure exits with non-zero code.

Source code in m/cli/commands/message/error.py
class Arguments(BaseModel):
    """Report an error.

    example::

        ~$ m message error 'this is an error'
        ::error::this is an error
        ~$ echo $?
        1

    The procedure exits with non-zero code.
    """

    message: str = Arg(
        help='error message',
        positional=True,
        required=True,
    )
    file: str | None = Arg(  # noqa: WPS110 - required by Github
        aliases=['f', 'file'],
        help='filename where error occurred',
    )
    line: str | None = Arg(
        aliases=['l', 'line'],
        help='line where error occurred',
    )
    col: str | None = Arg(
        aliases=['c', 'col'],
        help='column where error occurred',
    )

Options

-f, --file

filename where error occurred

-l, --line

line where error occurred

-c, --col

column where error occurred

Positional arguments

message

error message