473,699 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crash and quit

I noticed that when a .Net application crashes you get a message box
indicating that an unhandled exception has occurred and it gives you the
option to Continue or Quit.

What I would like to do is to disable the Continue button so the application
is forced to end. I need this behavior because if my app crashes like that
it means that something unexpected happen and the state of my objects
(variable values) may be undetermined and the app should not continue
because if it does it will have unpredictable behavior.

Is there an easy way to do this or do I have to catch all unhandled
exceptions and end the program manually by code?

Thanks.


Jan 30 '06 #1
4 1459
> I noticed that when a .Net application crashes you get a message box
indicating that an unhandled exception has occurred and it gives you
the option to Continue or Quit.

What I would like to do is to disable the Continue button so the
application is forced to end. I need this behavior because if my app
crashes like that it means that something unexpected happen and the
state of my objects (variable values) may be undetermined and the app
should not continue because if it does it will have unpredictable
behavior.

Is there an easy way to do this or do I have to catch all unhandled
exceptions and end the program manually by code?

Thanks.


Try wrapping the code in the main application method in a try/catch clause.

--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vk arlsen.no
PGP KeyID: 0x2A42A1C2
Jan 30 '06 #2
> Try wrapping the code in the main application method in a try/catch
clause.


Yep, that's what I am doing right now I was just wondering if there is
another solution to hard coding the end of the app when crashing.
Jan 30 '06 #3
On Mon, 30 Jan 2006 02:04:39 -0600, "Rene" <a@b.c> wrote:
I noticed that when a .Net application crashes you get a message box
indicating that an unhandled exception has occurred and it gives you the
option to Continue or Quit.

It seems to me that you will only see it that way if you are in the
IDE and in debug mode. Your compiled release version should not do
that. It should only show the OK button. Please correct me if I'm
wrong.

Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Jan 30 '06 #4
> It seems to me that you will only see it that way if you are in the
IDE and in debug mode. Your compiled release version should not do
that. It should only show the OK button. Please correct me if I'm
wrong.


No, it shows both buttons no matter what, at least on my computer.
Jan 30 '06 #5

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

Similar topics

48
8482
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential problem. The program may crash unexpectedly while writing to the file. If so, my program should detect this during startup, and then (during startup) probably delete the data added to the file and redo the writing operation.
10
3300
by: Paul Miller | last post by:
I'm not sure if this is a python bug or a bug in an associated library, and I'm not even sure how to correctly report it, but here is Anytime python is accepting keyboard input, whether it's with raw_input, or sitting on the command line waiting for the user to type code, you can crash python by holding ctrl+shift and then pressing enter. This is on a RedHat 9.0 system running on an Athlon 600. Basically everything about the system is...
1
2552
by: Mark Carter | last post by:
I use Office 2000, and I have recently upgraded to python 2.3 and win32all-155.exe The following code worked in python 2.2: xlApp = Dispatch("Excel.Application") xlApp.Visible = 1 xlApp.Workbooks.Add() xlApp.ActiveWorkbook.SaveAs(sys.path + '\\temp.xls') wb = xlApp.Workbooks("temp.xls")
0
1416
by: Adam | last post by:
I have an application which interacts with a webserver over https using client certificates. Due to a bug in openssl 0.9.6, I upgraded to 0.9.7 and rebuilt python. Now, when I access the page python is crashing with with a "bus error" and coring. Any insite as to what I need to do to fix this? The gdb output is below.
0
1436
by: J Skeggs | last post by:
Hi, Please can someone help me! I have an excel macro which runs a macro in a microsoft access database using the following code: '******************************************** '* This part of the routine runs another routine within * '* MS Access to export data to MS Excel *
1
1104
by: EK | last post by:
I have an application that executes a lengthy search (5-10 sec) against a SQL server. Everything runs fine when only one user executes the search but when 2 or more users searching at once the application crash. The query returns a valid dataset, but when the application trying to access data stored in the session object it’s like the object is reset and no data is variable. Its working quit well with only one user or when the users not...
5
1227
by: Rarlfth Nadar | last post by:
Create a new solution, add a class... Public Class Class1 Public Sub New() .New() '<----- This line will blow up the IDE
2
2016
by: Anbeyon | last post by:
Hi Sorry for cross posting but didn't see this group earlier... I'm hoping someone might be able to point me in the right direction. I have a number of applications written in vb6. Two of the apps are still in development and so I have sat down today to continue working on them but have discovered I have a real big problem.
39
5858
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
0
8685
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8880
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
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 project—planning, coding, testing, and deployment—without 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
6532
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
4374
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...
1
3054
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
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
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.