try without catch

Ulf Wiger (AL/EAB) <>
Wed Nov 16 11:20:00 CET 2005


Edoc uses syntax_tools to read the source and extract
comments. Looking into my local copy of the html
docs, I was also unable to find any suggestion that 
syntax_tools is prepared to handle syntactically
incorrect source files in some cases. 

Looking at the source, erl_comment_scan.erl makes 
practically no assumptions about the code (apart from
the expected format of a comment.)

But since edoc builds a function index and generates
default documentation about the exported functions,
it is hard to see how it _couldn't_ require that the 
source is syntactically correct. 

However, since edoc uses epp_dodger by default, its 
parser is not the standard parser (which cannot handle
macros, for example).

/Uffe

> -----Original Message-----
> From: bryan rasmussen [mailto:] 
> Sent: den 16 november 2005 10:28
> To: Ulf Wiger (AL/EAB)
> Cc: 
> Subject: Re: try without catch
> 
> I thought Edoc was just a documentation generator, it does 
> checking too? Because I'm not finding anything in the 
> documentation using 
> http://erlang.se/doc/doc-5.4.8/lib/edoc-0.6.2/doc/html/index.html
> because this 
> http://erlang.se/doc/doc-5.4.10/lib/edoc-0.6.7/doc/index.html
> returned 404.
> 
> 
> Cheers,
> Bryan Rasmussen
> 
> 
> 
> 
> 
> On 11/15/05, Ulf Wiger (AL/EAB) <> wrote:
> >
> > I wrote the following in a program of mine:
> >
> > try Expr of
> >   Result -> Action
> > end.
> >
> > i.e. no catch. The idea was to add a catch later, when I 
> had thought 
> > of something clever to do.
> >
> > The compiler didn't have a problem with that (nor does the erlang 
> > reference manual), but edoc (edoc-0.6.2 in R10B) did. It 
> treated it as 
> > a syntax error.
> >
> > /Uffe
> >
> 



More information about the erlang-questions mailing list