![]() ![]() |
||
![]() |
![]() |
|
![]() |
[wingide-users] WEP: raises(Exception1, 2, 3, ...)jpe@archaeopteryx.com jpe@archaeopteryx.comMon, 5 Nov 2001 09:57:30 -0500 (EST)
It's a good idea and will be added to the TODO list. I doubt we'll be able to implement it before 1.1, though. Thanks, John On Sat, 3 Nov 2001, F. GEIGER wrote: > Wouldn't it be fine, if the Source Browser could show all the exceptions a > method might raise? > > Example: > > ---- > > def yourMethod(self, x, y, z): > if not ...: > raise ValueError > else: > : > : > > def myMethod(self): > : > : > abc = o.yourMethod(1, 2, 3) > if not abc: > raise MyException > : > : > return > > ---- > > This would show up in the SB like so: > > YourClass > __init__ ... > yourMethod ... (raises: ValueError) > > MyClass > __ini__ ... > myMethod ... (raises: ValueError, MyException) > > > Is this feasible? Don't get me wrong: There is no need for a compiler-like > "Error: #98758725 - You did not catch exception 'ValueError' in > 'MyClass.myMethod'" > "Error: #98758725 - You did not catch exception 'MyException' in > 'HisClass.blabla'"! > It would be just an aid in finding all those exceptions burried in all the > layers of a program. > > What do you think? > > > Best regards > Franz GEIGER
Run by Mailman v 2.0.8 |
|
|
Copyright (c) 2000-2002, Archaeopteryx Software, Inc. Legal Statements | ||