From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o5UNCPGV030664 for ; Wed, 30 Jun 2010 19:12:25 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1OU6S7-0004U0-PB; Thu, 01 Jul 2010 01:12:23 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OU6S7-0008MD-O3 for discuss@mdocml.bsd.lv; Thu, 01 Jul 2010 01:12:23 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1OU6S7-0001tI-NM for discuss@mdocml.bsd.lv; Thu, 01 Jul 2010 01:12:23 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1OU6S7-0006H7-Fv for discuss@mdocml.bsd.lv; Thu, 01 Jul 2010 01:12:23 +0200 Date: Thu, 1 Jul 2010 01:12:23 +0200 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Subject: Re: Improving error messages? Message-ID: <20100630231223.GM24358@iris.usta.de> References: <20100630225034.GF6829@danbala.tuwien.ac.at> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100630225034.GF6829@danbala.tuwien.ac.at> User-Agent: Mutt/1.5.20 (2009-06-14) 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