Re: VB2008: Getting the System.Reflection.PropertyInfo from within a class property

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



"Etienne-Louis Nicolet" <nie.msft@xxxxxxxxxxx> schrieb
Many thanks for your tip. Since I'm quite new to VB.NET, I just try
to get into Exception handling.
The idea was the following: MyClass is responsible for the data
handling. In case user input is required the the data is passed to a
form which then returns the new/modified data back to
MyClass.MyClass validates the data. In case of errors it would send
a kind of error report (what i called my error handler) which would
finally feed the form's ErrorProviders...

Hmmm... not easy find the right approach... It also depends on where you
want to continue if an error(/exception) occurs. If you want to handle
exceptions at different locations individually but standardized - that's how
it looks in your example - you can still call a method in MyClass, and,
inside, walk the Stacktrace (Dim bla as new Stacktrace(<...>)) and retrieve
the required information, just like you can do it with "New
Stacktrace(exception)" in the case of handling exceptions. I'm writing this
without having used ErrorProviders so far...


Armin

.



Relevant Pages

  • Re: Error handling in VB6
    ... The VB syntax for catching and handling errors is definitely not ... exceptions thrown in Main, and in anything called from Main. ... OnError GoTo SomeErrHandler ... VB6 has no such thing as a global error handler. ...
    (microsoft.public.vb.general.discussion)
  • Re: File Descriptors
    ... At least one Tcl ... I think that depends somewhat one where you are coming to tcl/tk from. ... With regard to error handling in particular, ... Conditions under which exceptions occur ...
    (comp.lang.tcl)
  • Re: Exception as the primary error handling mechanism?
    ... handling rather than use error code. ... In the article API Design Matters by Michi Henning ... handling exceptions is almost always slower than testing a return ... could some python expert explain to me why exception is ...
    (comp.lang.python)
  • Re: Practical error/exception handling...
    ... >> exceptions be iterated in order to get a better response. ... >> What I have done in the past is to have a database table of error codes ... >> error to a global error handling routine that can roll back transactions ... deal with a missing network connection or a file being locked when these ...
    (alt.comp.lang.borland-delphi)
  • Re: Throwing Exceptions from Property
    ... If exceptions are reasonable even for value-getting, ... there is a difference between exceptions caused by ... MyClass x says that it has a Name property. ... lied and there is no way that the caller could avoid it. ...
    (microsoft.public.dotnet.languages.csharp)