Thread overview | |||||
---|---|---|---|---|---|
|
October 28, 2006 [Issue 466] New: dmd prevent this from link , if so please prevent it from compiling | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=466 Summary: dmd prevent this from link , if so please prevent it from compiling Product: D Version: 0.173 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: davidl@126.com import std.stdio; class Exception { char[] Exception; } void caller() { int count=0; void func(lazy char [] errormessage) // if it can be a nested func inside the caller would be nice { count++; if (count<3) { throw new Exception(errormessage); } } try { delete_directory("/home/someuser") ; } catch { }; } void delete_directory(char [] dirname) { // caller.func("hurray"); // caller.func("hurray"); // caller.func("hurray"); } void main() { caller(); } and the example code here is trying to interact with the try block owner i hope compiler would be able to generate the func in the example. like we have code import std.stdio; class Exception { char[] Exception; } void caller() { int count=0; try { delete_directory("/home/someuser") ; } catch { count++; if (count<3) { continue; // i want that to continue the point where throw the exception } }; } void delete_directory(char [] dirname) { throw new Exception("File1"); // maybe we can add a keyword like action, to let the try block to determine how to deal with the action, then we won't affect the exception we have now; throw new Exception("File2"); throw new Exception("File3"); // caller.func("hurray"); // caller.func("hurray"); // caller.func("hurray"); } void main() { caller(); } -- |
November 08, 2006 Re: [Issue 466] New: dmd prevent this from link , if so please prevent it from compiling | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail Attachments: | d-bugmail@puremagic.com schrieb am 2006-10-28: > http://d.puremagic.com/issues/show_bug.cgi?id=466 > import std.stdio; > class Exception > { > char[] Exception; > } <snip> Added to DStress as http://dstress.kuehne.cn/compile/m/mangleof_17_A.d Thomas |
November 25, 2006 [Issue 466] dmd prevent this from link, if so please prevent it from compiling | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=466 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from bugzilla@digitalmars.com 2006-11-25 03:55 ------- Fixed DMD 0.175 -- |
Copyright © 1999-2021 by the D Language Foundation