discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Subject: Re: Improving error messages?
Date: Thu, 1 Jul 2010 01:12:23 +0200	[thread overview]
Message-ID: <20100630231223.GM24358@iris.usta.de> (raw)
In-Reply-To: <20100630225034.GF6829@danbala.tuwien.ac.at>

Hi Thomas,

Thomas Klausner wrote on Thu, Jul 01, 2010 at 12:50:34AM +0200:

> Recently I stumbled over a problem in pfstat(8) where a Bl had no
> matching El; the mandoc version at that time wasn't even complaining
> about it, just the error code returned was 1.
> 
> I've tried to file a proper bug report about this and reproduce the
> problem first.
> 
> mandoc-1.10.1 is complaining about the man page with the error:
> 
> test.1:14:2: scope broken, syntax violated:
> multi-line scope breaks multi-line of It
> 
> I must confess, I wouldn't have a clue how to find the root cause of
> this from the description.
> 
> groff-1.19.2 complains about the same problem this way:
> 
> mdoc warning: A .Bl directive has no matching .El (#14)
> 
> Perhaps the error message can be improved?

In general, yes, we plan to make error messages more specific.
There is still much work to do in that area, so bear with us.
Currently, i'm still focussing on formatting errors,
but i'm already starting to improve some messages as well.

By mere chance, i committed an improvement for the message you are
talking about just yesterday:

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/mdoc_macro.c?sortby=date#rev1.47

http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_macro.c?cvsroot=mdocml#rev1.83

The current state is:

  $ mandoc test.1       
  test.1:14:2: FATAL: blocks badly nested: Sh cannot break It

Note that the message gives the exact line numer (14)
and column number (2) of the problem.

Yours,
  Ingo

> .Dd June 30, 2010
> .Dt TEST 1
> .Os
> .Sh NAME
> .Nm test
> .Nd test page
> .Sh DESCRIPTION
> .Bl -bullet
> .It
> first
> .It
> second
> .\".El
> .Sh BUGS
> The missing .El is not found.
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2010-06-30 23:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 22:50 Thomas Klausner
2010-06-30 23:12 ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100630231223.GM24358@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).