Best practise for raising/propagating errors?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I'm new to C# but have lots of programming experience with things like
VB, ASP, SQL Server, Oracle etc.

Just starting a new C# project (a DLL and a Windows service to call it)
and trying to figure out best practise for error handling, raising etc.

Basically, should I be logging the errors where there occur (in which
each class will need an instance of the event logger and database code)
and then just have every method as a boolean return so if there's an
error in method x, handle it there and then and return a false to the
calling method?

Or somehow ripple the error back up the tree. In that case, can I
append errors to errors so that I can build a complete stack trace? I
know there's an inner exception, but that's not a collection, it's just
the one right? If I try and access the System.Diagnostics.StackTrace at
the top level then it will only give me the one level (obviously) as
it's unwound itself as I've been throwing errors back up the chain.

Just a bit confused at the moment.

Thanks

.



Relevant Pages

  • Re: Oracle Query Performance, Indexes, and Optimization
    ... I'm a MS SQL Server guru, which is all we've got in-house. ... we've outsourced in an ASP model. ... provider is using Oracle 9 for the back end. ... One thing I should have mentioned is that it would be wise to look over the contract with the ASP. ...
    (comp.databases.oracle.server)
  • Re: Oracle Query Performance, Indexes, and Optimization
    ... Oracle databases. ... I'm a MS SQL Server guru, which is all we've got in-house. ... we've outsourced in an ASP model. ... provider is using Oracle 9 for the back end. ...
    (comp.databases.oracle.server)
  • Executing DTS that connect to Oracle from an ASP page
    ... I have a DTS that connect to an Oracle database and transform the data ... the DTS through the ASP page it fails in the Oracle task (I have a few ... without the Oracle Connection (pure SQL Server) and it works fine from ...
    (microsoft.public.sqlserver.dts)
  • Re: Oracle Query Performance, Indexes, and Optimization
    ... Oracle databases. ... I'm a MS SQL Server guru, which is all we've got in-house. ... we've outsourced in an ASP model. ... provider is using Oracle 9 for the back end. ...
    (comp.databases.oracle.server)
  • Display unicode data (Multi languages - Internationalization) on A
    ... MS SQL Server 2000 as a database to hold multi languages ... VB 6 to deploy DLL, which is used for Component Services ... Using ASP on front-end. ... Is there any way to display unicode data from MS Server database on ASP? ...
    (microsoft.public.vb.6.webdevelopment)