471,337 Members | 1,308 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Handling exceptions

Hi,

I need some help in this - I have a base abstract class in VB.Net and a
bunch of derived classes inheriting from the base class. One method in the
base class is overriden in the derived class. This method calls other methods
of base class.
Effectively,

MustInherit Class BaseAbstract

Sub Method1()
code..............
Method2()
code..............
End Sub

Sub Method2()
code..............
Method3()
code..............
End SUb

Sub Method3()
code..............
End Sub

Overridable Sub Method ProcessFile()

End Sub
End Class

Class Derived1 : inherits BaseAbstract

Overrides Sub ProcessFile()

'open file
'loop thru the file by reading one line at a time
do while
code................
Method1()
more code..............
loop
End Sub

End Class

My Q is - Where do I handle exceptions? Say for instance, an error occurs in
Method3. Where do I handle this error and if I do it in the method in the
base class, I'll need to inform the Derived class method i.,e original caller
that an error occurred and must skip this and go to next record/line from the
file.

Thanks.
hillcountry
Jul 21 '05 #1
0 954

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Hans-Joachim Widmaier | last post: by
28 posts views Thread by Frank Puck | last post: by
9 posts views Thread by C# Learner | last post: by
6 posts views Thread by Jesper Ordrup Christensen | last post: by
34 posts views Thread by rawCoder | last post: by
2 posts views Thread by Rajeev Soni | last post: by
16 posts views Thread by Chuck Cobb | last post: by
5 posts views Thread by Bry | last post: by
35 posts views Thread by jeffc226 | last post: by
35 posts views Thread by eliben | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.