www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Now we have assertion messages

reply Frank Benoit <keinfarbton nospam.xyz> writes:
Now we have the messages for the assertions. And this can be used to
help a D newbie very much with the error in this program:

/**/ import std.stdio;
/**/ int main( char[][] args ){
/**/   foreach( s; args ){
/**/     writefln( a );
/**/   }
/**/ }

gives:
Error: AssertError Failure m.d(6)

Feature request: Please add the message "missing return statement at
function exit"
Jun 06 2006
next sibling parent reply Sean Kelly <sean f4.ca> writes:
Frank Benoit wrote:
 Now we have the messages for the assertions. And this can be used to
 help a D newbie very much with the error in this program:
 
 /**/ import std.stdio;
 /**/ int main( char[][] args ){
 /**/   foreach( s; args ){
 /**/     writefln( a );
 /**/   }
 /**/ }
 
 gives:
 Error: AssertError Failure m.d(6)
 
 Feature request: Please add the message "missing return statement at
 function exit"

Great idea. Sean
Jun 06 2006
parent Brad Roberts <braddr puremagic.com> writes:
On Tue, 6 Jun 2006, Sean Kelly wrote:

 Frank Benoit wrote:
 Now we have the messages for the assertions. And this can be used to
 help a D newbie very much with the error in this program:
 
 /**/ import std.stdio;
 /**/ int main( char[][] args ){
 /**/   foreach( s; args ){
 /**/     writefln( a );
 /**/   }
 /**/ }
 
 gives:
 Error: AssertError Failure m.d(6)
 
 Feature request: Please add the message "missing return statement at
 function exit"

Great idea.

Funny you should say that.. I started going through the front end last night looking at those.. I'll attach a patch to a bug tonight or tomorrow unless someone beats me to it (that includes you Walter). If anyone else wants to do it, speak up to avoid duplication of effort. Later, Brad
Jun 06 2006
prev sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Frank Benoit" <keinfarbton nospam.xyz> wrote in message 
news:e64vcd$1iol$1 digitaldaemon.com...

 Feature request: Please add the message "missing return statement at
 function exit"

I was just thinking about this today when I was mowing the lawn!
Jun 06 2006