473,395 Members | 1,613 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.

.NET and C# error messages wishlist

I love the .NET framwework. Compared to mfc this is a dream to work with.

I would love if the C# and maybe other languages too, somehow gives more
friendly messages when executed on a machine with not .NET framework
installed.

* Some unmanaged startup stub in the generated executable would be nice.
Maybe a stub that starts up a web site telling you that this application
cannot be run and that you need to install the .NET framework in order to
run this program. (now I get some strange error about an mscoree not found.
This might scare away a lot of users to ever download a .NET program again)

* And another point for the wishlist, is to make the .NET framework a little
bit user friendly when it encounters an error.
If a dll is incorrect I get a cryptic dialog box with a lot of technical
details, which is nice for the programmer that develops the program but
useless for the user.
Again, a web page could be shown telling you that you do not have enough
security rights browse to a network drive and that you have to give enough
rights to the program.
Maybe with a link to the .NET configuration program.
This would also be nice if some dll is not installed. It could show a web
page telling you that the dll with version xx.xx.xx.is not found and that
needs to be installed first.
This could be some plug-in that hooks itself to the .NET error handling.

Nov 15 '05 #1
5 1663
On Mon, 22 Sep 2003 10:12:52 +0200, <Ol**********@skyscan.be> wrote:
I love the .NET framwework. Compared to mfc this is a dream to work with.

I would love if the C# and maybe other languages too, somehow gives more
friendly messages when executed on a machine with not .NET framework
installed.

* Some unmanaged startup stub in the generated executable would be nice.
Maybe a stub that starts up a web site telling you that this application
cannot be run and that you need to install the .NET framework in order to
run this program. (now I get some strange error about an mscoree not
found.
This might scare away a lot of users to ever download a .NET program
again)

I think that may be a limitation of windows. It's an executable, but
windows doesn't know what to do with it when it can't find the file that do
know.

Personally, I hate programs that start up web pages.
* And another point for the wishlist, is to make the .NET framework a
little
bit user friendly when it encounters an error.
If a dll is incorrect I get a cryptic dialog box with a lot of technical
details, which is nice for the programmer that develops the program but
useless for the user.
Again, a web page could be shown telling you that you do not have enough
security rights browse to a network drive and that you have to give
enough
rights to the program.
Bleh, why web pages? Why not a dialog box. Use try/catch and give a
friendlier error instead of the default one.
Maybe with a link to the .NET configuration program.
This would also be nice if some dll is not installed. It could show a web
page telling you that the dll with version xx.xx.xx.is not found and that
needs to be installed first.
This could be some plug-in that hooks itself to the .NET error handling.


You can do this by yourself with try/catch. And again, why web pages?!

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #2
> I think that may be a limitation of windows. It's an executable, but
windows doesn't know what to do with it when it can't find the file that do know.
Maybe the next critical update might contain some windows kernal upgrade to
help the transition to .NET?
Personally, I hate programs that start up web pages.
This was just an example.
It might also be a dialog box.
Bleh, why web pages? Why not a dialog box. Use try/catch and give a
friendlier error instead of the default one.

For errors that are typical for your application, you are right.

But for errors that are created because of security rights or missing
dll's... a more user friendly standard error handling might be wishful.
Especially for the people that starts programming in .NET.
And having a try-catch for every function you write is not very productive,
and creates a lot of overhead..

Also, I discovered that a lot of programmers have no clue how to use the
try-catch mechanism the right way.
A lot of them uses this just to stop access-violations. (To hide
programming bugs)

One sollution might be to replace the standard exception handler with a more
user friendly one that can be compiled into the program.
Can this be done in C#? Does that exist? And where can I find this?
Nov 15 '05 #3
I was thinking more of a global one, wrapping Application.Run().
It could simply report the error message and ignore the debugging info.

What you are seeing is in fact a message made because no exception handler
was found for the exception.

static void Main() {
try
{
Application.Run(new Form1());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message, "Critical Error!");
}
}

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #4
> I was thinking more of a global one, wrapping Application.Run().
It could simply report the error message and ignore the debugging info.

What you are seeing is in fact a message made because no exception handler
was found for the exception.

Why didn't I think of this? :-)
That seems a good idea to try to implement.
Nov 15 '05 #5
Morten Wennevik wrote:
I was thinking more of a global one, wrapping Application.Run().
[...]
static void Main() {
try
{
Application.Run(new Form1());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message, "Critical Error!");
}
}


A global one would be:
- Registering an event on
"System.AppDomain.CurrentDomain.UnhandledException "

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
Nov 15 '05 #6

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

Similar topics

2
by: lkrubner | last post by:
This is a general computer question, but I'm writing in PHP so I'll post this to comp.lang.php. I've been writing a content management system. I've a Singleton object that keeps track of all...
10
by: DataBard007 | last post by:
Hello Access Gurus: I use Win98SE and Access97. I just built a simple Access97 application which holds all contact information for my personal contacts, such as first name, last name, address,...
83
by: newby2c | last post by:
My personal K&R (3rd edition) wish list: 1. That a 3rd edition is actually published! 2. Make any and all corrections from earlier editions. 3. Update to comply with the c99 Standard. 4. A...
1
by: Marco | last post by:
Is there a wishlist for c# (or .Net) where we could suggest changes or improvements ? Mine is to have access to SmallChange property of Panel scrollbars as well as access to theirs Scroll event....
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
1
by: Olaf Baeyens | last post by:
Something for the C#/JIT wishlist. I am looking at the generated IL Assembler code and the generated real x86 code and I am facinated about the quality of the generated code. It comes to near...
2
by: vasilip | last post by:
I am trying to use the XMLUPDATE stored procedure. Installed fine, and seems to work great if I execute the statement from a sql query using the controll center.. Doesn't work from java however. I...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.