Re: Knowing the exceptions thrown by a method

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Juan María" <Juan Mara@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C9666F3-ACC2-4A45-884B-139AF7320314@xxxxxxxxxxxxxxxx
> Hi, I would know how could I know what exceptions are thrown by a method
in
> code writing time. Is this possible? If yes, how?.

Hi Juan, there are no checked exceptions in C#. You can read the
documentation to see what throws what, you 'll just have to trust the
documentation, or install .Net reflector and get digging :)

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton


.



Relevant Pages

  • Re: CLOS and C++
    ... > relative percentage of needing to know the exceptions a given method can raise ... >> with the information provided by the mandatory type declarations. ... javadoc comments and put it into the class file and then change the ... attach the documentation directly to the elements its documenting so ...
    (comp.lang.lisp)
  • Re: SqlConnection.Open() Which ErrorCodes
    ... exceptions is that they are often too generic and the ... Hitchhiker's Guide to Visual Studio and SQL Server ... the documentation in the .NET Framework Help for these classes: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Problems Handling Errors Correctly
    ... But as with your observation about the .NET Framework itself, to some extent this is a consequence of the sheer size of the Framework. ... One hopes that over time, the documentation will get filled in, but it's not hard to see why some things may have been considered lower priority and receive a basic "template" documentation rather than a fully useful description. ... the docs include a section immediately after the "Return Value" section enumerating possible exceptions. ... If it's not the case, or it's incomplete, or it leaves out exceptions that could be thrown my methods called from the method, that would really be a drag. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Newbie question: what exceptions are thrown by FTP class
    ... give which lists the thrown exceptions and the reasons why ... If the author includes that in the API documentation, ... determine from static source analysis which exceptions may or may not be ... the exception is thrown from nlst> retrlines> ...
    (comp.lang.ruby)
  • Re: a criticism of java
    ... > Am I to take this to mean that documentation needs to duplicate the ... I was really only referring to after the throws clause. ... appeared to me to not agree with unchecked exceptions, ... > is better expressed in the language. ...
    (comp.lang.java.programmer)