473,804 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New properties of Exception descendant are not shown in snapshot viewer

Problem:
I created a custom exception that inherits from Exception and added a some
of new properties. All new properties filled in the constructors. When I
throwing this custom exception and go to the snapshot viewer the last shows
only properties of Exceptions, the new properties are not shown.
Question:
How to show new properties of Exception-descendants in the snapshot viewer
(such as, for example, SqlException shows Procedure, Line and etc.)?
Dec 4 '06 #1
4 1367
It should work!!!.

you are trying to use the viewer in catch() statement? is your catch
statement declared the exception object of Type MyCustomExcepti on?
//catch(MyCustomE xception ex)
//and not
catch(Exception ex)

Regards,
Stanislaw Tristan wrote:
Problem:
I created a custom exception that inherits from Exception and added a some
of new properties. All new properties filled in the constructors. When I
throwing this custom exception and go to the snapshot viewer the last shows
only properties of Exceptions, the new properties are not shown.
Question:
How to show new properties of Exception-descendants in the snapshot viewer
(such as, for example, SqlException shows Procedure, Line and etc.)?
Dec 5 '06 #2
Yes, of cource, MyCustomExcepti on

"singhhome" <si*******@gmai l.com???????/???????? ? ???????? ?????????:
news:11******** *************@7 3g2000cwn.googl egroups.com...
It should work!!!.

you are trying to use the viewer in catch() statement? is your catch
statement declared the exception object of Type MyCustomExcepti on?
//catch(MyCustomE xception ex)
//and not
catch(Exception ex)

Regards,
Stanislaw Tristan wrote:
>Problem:
I created a custom exception that inherits from Exception and added a
some
of new properties. All new properties filled in the constructors. When I
throwing this custom exception and go to the snapshot viewer the last
shows
only properties of Exceptions, the new properties are not shown.
Question:
How to show new properties of Exception-descendants in the snapshot
viewer
(such as, for example, SqlException shows Procedure, Line and etc.)?

Dec 7 '06 #3
I tried it on my system and it was showing new properties in the
visualizer!
can u send ur code of mycustomexcepti on?

Regards,
Stanislaw Tristan wrote:
Yes, of cource, MyCustomExcepti on

" It should work!!!.

you are trying to use the viewer in catch() statement? is your catch
statement declared the exception object of Type MyCustomExcepti on?
//catch(MyCustomE xception ex)
//and not
catch(Exception ex)

Regards,
Stanislaw Tristan wrote:
Problem:
I created a custom exception that inherits from Exception and added a
some
of new properties. All new properties filled in the constructors. When I
throwing this custom exception and go to the snapshot viewer the last
shows
only properties of Exceptions, the new properties are not shown.
Question:
How to show new properties of Exception-descendants in the snapshot
viewer
(such as, for example, SqlException shows Procedure, Line and etc.)?
Dec 7 '06 #4
This a code of Exception:

Imports Zestad.Common.V alidation

Namespace Exceptions

''' <summary>
''' Occurs if one or more business rules validation breaks
''' </summary>
<Serializable() _
Public Class ValidationExcep tion : Inherits Exception

Private varErrors As List(Of ValidationError )
''' <summary>
''' List of validation errors
''' </summary>
Public ReadOnly Property Errors() As List(Of ValidationError )
Get
Return varErrors
End Get
End Property

Private varTestProperty As string
''' <summary>
''' This is a test property for test catching and showing in the visualizer
''' </summary>
Public ReadOnly Property TestProperty() As string
Get
Return varTestProperty
End Get
End Property

''' <summary>
''' Constructor of this class
''' </summary>
Public Sub New(ByVal Message As String, Test as string, ByVal Errors As List(Of ValidationError ))
MyBase.New(Mess age)
Me.varErrors = Errors
Me.varTestPrope rty=Test
End Sub

''' <summary>
''' Returns bulleted string with error descriptions
''' </summary>
Public Overloads Function ToString(Option al ByVal Bullet As String = "", Optional ByVal IncludeMessage As Boolean = False) As String
If Me.Errors.Count = 0 Then Return ""
Dim ErrorsArray(Me. Errors.Count) As String
For i As Integer = 0 To Me.Errors.Count - 1
ErrorsArray(i) = Bullet & Me.Errors(i).Ca use
Next
If IncludeMessage = True Then
Return Me.Message & StrDup(1, Chr(13) & Chr(10)) & Join(ErrorsArra y, Chr(13) & Chr(10))
Else
Return Join(ErrorsArra y, Chr(13) & Chr(10))
End If
End Function
End Class

End Namespace

And this is a block catch:

try
....some_code.. .
throw new ValidationExcep tion ("test_message" , "test_property_ value", varErrors)
....
catch ex as ValidationExcep tion
throw ex ' visualizer shows only properties of parent class (Exception), but not ValidationExcep tion
end try

"singhhome" <si*******@gmai l.comсообщ ил/сообщил в новостя следующ е: news:11******** **************@ 73g2000cwn.goog legroups.com...
>I tried it on my system and it was showing new properties in the
visualizer!
can u send ur code of mycustomexcepti on?

Regards,
Stanislaw Tristan wrote:
>Yes, of cource, MyCustomExcepti on

" It should work!!!.
>
you are trying to use the viewer in catch() statement? is your catch
statement declared the exception object of Type MyCustomExcepti on?
//catch(MyCustomE xception ex)
//and not
catch(Exception ex)

Regards,
Stanislaw Tristan wrote:
Problem:
I created a custom exception that inherits from Exception and added a
some
of new properties. All new properties filled in the constructors. When I
throwing this custom exception and go to the snapshot viewer the last
shows
only properties of Exceptions, the new properties are not shown.
Question:
How to show new properties of Exception-descendants in the snapshot
viewer
(such as, for example, SqlException shows Procedure, Line and etc.)?
Dec 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5433
by: Louis Eastwood | last post by:
I am getting this error when trying to create a Snapshot report in Access 97 on Win98 machine: "Microsoft Access can't complete the Output operation. The Visual Basic code you entered contains a syntax error or the Ouput procedures are not available....." This occurs using either the menu send command or VBA SendObject and OutputTo methods in code.
1
4876
by: Rick Brown | last post by:
I'm trying to find a way to output a Access97 report to a file without losing any of the formatting. The Microsoft Snapshot Viewer does this perfectly but the person opening the file needs the viewer loaded on their PC. What follows are the ramblings of a network novice. Currently my company has two types of PC's in the shop. The PCs at each machining center run on a NT server (I: drive) and the office machines run on a shared Novell...
0
1600
by: Soly | last post by:
I would like to use automation to print a snapshot file from an snapshot viewer ActiveX control using the PrintSnapshot method. The argument for this method is True/False to show/hide the Print dialog box. When i hide the dialog box (False), the snapshot is always printed in Portrait, because that is the default settings for my printer, even though the snapshot is landscape. How do I get past this so the snapshot is printed as it...
5
3486
by: tom | last post by:
Hey All- I've exported a report to Access's "snapshot" format and want to put it on a website for users to view. However, when I click on the link to the snapshot file, I notice that my browser (IE6) attempts to open it as if it were a regular html page, thereby displaying a bunch of gobbledygook. Any ideas on what has to be tweeked (in the link/on the website or server) to make the browser know it should either (a) try to launch...
9
2812
by: bluedolphin | last post by:
Hello All: I have been brought onboard to help on a project that had some performance problems last year. I have taken some steps to address the issues in question, but a huge question mark remains. Last year, all of the tables and reports were stored in Access. The database was put online so that end users could access the reports online using Snapshot Viewer. The reports were aggregated on the fly, and the selection criteria...
3
2582
by: DavidB | last post by:
I have a Snapshot Control in a continuous form and I want the source for the control to be different for each instance of the continuous data (based on one of the fields in the recrod source for the form). For example, if there is a field with a unique numeric value in the recrod source for the form, the report that should be displayed in the Snapshot Control would be CurrentUniqueValue.snp. Anyoen know if this is possibel and if so how I...
4
2601
by: Salad | last post by:
Hi: I have the following line: DoCmd.SendObject acSendReport, "TestReport", _ "SnapshotFormat (*.snp)", _ "joeblow@nowhere.com", , , "Report Test", _ "Does it open correctly?", True I have a report called TestReport. I dropped an image control in the report, and imported a .BMP file into it as the report's background, and sent it to back. I then dropped my fields on top of the image.
3
2054
by: Steven Thomas | last post by:
I am working on a ASP.NET application using VB.NET. I have a function that creates a snapshot file on a separate server and passes a path back to the webpage. Now I want to display the snapshot. If I cut and paste the path into the browser it opens snapshot viewer. Exactly what I want. However, if I response.redirect to the path, I get a error that the file can not be found. If I response.redirect to "file:"+path It opens the snapshot...
8
5489
by: grant | last post by:
Hi I've copied Stephens code into my db, and can get it to work, but only on "plain Jane" reports with no images. Most of my reports has an unbound image obluect in them that I set to an external image file using on_open code I've searched through this group and there are a few comments about snapshots not working with embedded images, and my testing seems to
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.