473,395 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

[Checked exceptions] Any tools out there?

Hi everybody,

I like checked exceptions as provided by Java. No, I don't want to start a
thread on that, but ask, if anyone knows of a tool for that. It may be
stand-alone, but being plugable into MSVS would ease its use, I guess.

Many thanks in advance and best regards
Franz GEIGER

Nov 15 '05 #1
9 1454
for me, who has never written a line of Java, I'd like it if you could
explain this concept. One of us may be able to translate it into .NET for
you.
--- Nick

"F. GEIGER" <fg*****@datec.at> wrote in message
news:c0**********@newshispeed.ch...
Hi everybody,

I like checked exceptions as provided by Java. No, I don't want to start a
thread on that, but ask, if anyone knows of a tool for that. It may be
stand-alone, but being plugable into MSVS would ease its use, I guess.

Many thanks in advance and best regards
Franz GEIGER

Nov 15 '05 #2
Nick Malik <ni*******@hotmail.nospam.com> wrote:
for me, who has never written a line of Java, I'd like it if you could
explain this concept. One of us may be able to translate it into .NET for
you.


The checked exception scheme is one where most exceptions count as
checked, and any method which may throw those exception (including by
calling other methods which may throw them) has to declare which
checked exceptions it might throw.

There's no equivalent in .NET - I ping-pong back and forth as to
whether or not it's a good idea. It (.NET) feels like driving without a
seatbelt - it feels more free, but more dangerous too.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #3
If you really want checked exceptions, you should take a look at J#. You
will get all the Java features + direct access to the .NET framework. This
is probably the easiest way to get checked exceptions in the .NET world.

Otherwise, in C#, you could fake them by introducing a special "Throws"
attribute that lists the exceptions that a method may throw. The hard part
will be to write a tool that analyses the bodies of methods and tells you if
you violate the checked exception constraints.

To me, this is not worth the trouble at all. I have done lots of programming
in Java, and I ended up dropping checked exceptions completely and
subclassing all my exceptions from RuntimeException. But if you really want
this feature...

Bruno.

"F. GEIGER" <fg*****@datec.at> a écrit dans le message de
news:c0**********@newshispeed.ch...
Hi everybody,

I like checked exceptions as provided by Java. No, I don't want to start a
thread on that, but ask, if anyone knows of a tool for that. It may be
stand-alone, but being plugable into MSVS would ease its use, I guess.

Many thanks in advance and best regards
Franz GEIGER

Nov 15 '05 #4

Hi F. GEIGER,

Thank you for posting in the community!

Bruno has provided 2 ways for you. Does that make sense to you?

Yes, C# does not implement the "Checked Exception", there is a conversation
between C# designer Anders and Bruce Eckel, talked about this:
http://www.artima.com/intv/handcuffs.html

If you are interested in the future directions for C#, please refer to:
http://msdn.microsoft.com/chats/vstu...dio_032103.asp

There is some "Checked Exception" quesiton in the link.

I hope the information I provide you makes sense to you.

If you have any further concern, please feel free to feedback, we will help
you to resove it.

Anyway, I will monitor this thread, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #5
Thanks to all who contributed!

<Nick>
for me, who has never written a line of Java, I'd like it if you could
explain this concept. One of us may be able to translate it into .NET for
you.
</Nick>

Nick, I think from the responses to my post it has become clear, what I'm
speaking of. Nevertheless, sorry for assuming that everyone knows about
checked exceptions.

<Jon>
There's no equivalent in .NET - I ping-pong back and forth as to
whether or not it's a good idea. It (.NET) feels like driving without a
seatbelt - it feels more free, but more dangerous too.
</Jon>

Yes, that's exactly how I see it too. I still have very little experience in
programming Java (started a few weeks ago, in my spare time, like C# too),
but immediately found, that checked exceptions are what I always missed in
C++ (I come from the C, MSVC++, Python corner). Yes, MSVC++ has exception
specs, but they aren't checked. And I always found that a pity.

<Bruno>
Otherwise, in C#, you could fake them by introducing a special "Throws"
attribute that lists the exceptions that a method may throw. The hard part
will be to write a tool that analyses the bodies of methods and tells you if
you violate the checked exception constraints.
</Bruno>

Yes, a fake like that would be the seed to build a tool around. My hope was,
that somebody already has bitten the bullet...

<Jeffrey>
Yes, C# does not implement the "Checked Exception", there is a conversation
between C# designer Anders and Bruce Eckel, talked about this:
http://www.artima.com/intv/handcuffs.html
</Jeffrey>

I've read it. In that article Anders says, that tools will take over in this
matter. Seems reasonable to me. For now it doesn't matter to me if such a
tool is the compiler itself or, well, a tool. However, I like to have the
choice: Seatbelts yes or no :-). But as I said: My experiences wrt checked
exceptions are little yet.
Many thanks again and best regards
Franz GEIGER

"F. GEIGER" <fg*****@datec.at> schrieb im Newsbeitrag
news:c0**********@newshispeed.ch...
Hi everybody,

I like checked exceptions as provided by Java. No, I don't want to start a
thread on that, but ask, if anyone knows of a tool for that. It may be
stand-alone, but being plugable into MSVS would ease its use, I guess.

Many thanks in advance and best regards
Franz GEIGER

Nov 15 '05 #6

Hi F. GEIGER,

Thanks very much for your feedback.

I am glad the community's reply makes sense to you.

After some searching in internet, I found there was a tool named "CLRxLint"
may meet your need.

CLRxLint is a checked exception verifier for Microsoft .NET platform. With
support for any MS CLR -based languages including C#, VB.NET and Managed
C++, CLRxLint is the only solution that introduces concept of checked
exception for .NET platform.

For more detailed information, please refer to the link:
http://www.software4net.com/products/clrxlint.html

There is also simple example in C# using checked exception in that link.

Hope it can help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #7
> http://www.software4net.com/products/clrxlint.html

Thanks for the hint, I'll have a look at it.

Best regards
Franz GEIGER

"""Jeffrey Tan[MSFT]""" <v-*****@online.microsoft.com> schrieb im
Newsbeitrag news:k$**************@cpmsftngxa07.phx.gbl...

Hi F. GEIGER,

Thanks very much for your feedback.

I am glad the community's reply makes sense to you.

After some searching in internet, I found there was a tool named "CLRxLint" may meet your need.

CLRxLint is a checked exception verifier for Microsoft .NET platform. With support for any MS CLR -based languages including C#, VB.NET and Managed
C++, CLRxLint is the only solution that introduces concept of checked
exception for .NET platform.

For more detailed information, please refer to the link:
http://www.software4net.com/products/clrxlint.html

There is also simple example in C# using checked exception in that link.

Hope it can help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #8
Hi GEIGER,

Thanks for your feedback.

That can help you.

My original response contains a reference to a third-party World Wide Web
site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or
information found on these sites; therefore, Microsoft cannot make any
representations regarding the quality, safety, or suitability of any
software or information found there. There are inherent dangers in the use
of any software found on the Internet, and Microsoft cautions you to make
sure that you completely understand the risk before retrieving any software
from the Internet.

Anyway, if you have further, please feel free to post, we will help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #9
Hi GEIGER,

Thanks for your feedback.

Hope that can help you.

I want to inform you that: my original response contains a reference to a
third-party World Wide Web site. Microsoft is providing this information as
a convenience to you.
Microsoft does not control these sites and has not tested any software or
information found on these sites; therefore, Microsoft cannot make any
representations regarding the quality, safety, or suitability of any
software or information found there. There are inherent dangers in the use
of any software found on the Internet, and Microsoft autions you to make
sure that you completely understand the risk before retrieving any software
from the Internet.

Anyway, if you have further, please feel free to post, we will help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #10

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

Similar topics

26
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal...
33
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal...
9
by: Jeff Louie | last post by:
I drank too much coffee last night and came up with a suggestion about how to add checked exceptions to C# http://www.geocities.com/jeff_louie/OOP/oop14.htm Comments expected <g> Regards,...
26
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.