473,568 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can't catch exceptions if winform is run from commandline

Hi,

I made a Windows application with C#. If you start the application directly
from the Desktop, and while running the application, I raised a
SecurityExcepti on and catched it in my code. So far so good. If you start
the application from commandline, and you come to the same error, then the
program does NOT run my catch code, but gives the user a Dialog with an
detailed description of the error AND the possibility to ignore the
exception!!!! That means in my case, that a user who has NOT the right to
use it, can use my application!

Thanks, Rainer.
Nov 22 '05 #1
0 774

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

Similar topics

21
2208
by: dkcpub | last post by:
I'm very new to Python, but I couldn't find anything in the docs or faq about this. And I fished around in the IDLE menus but didn't see anything. Is there a tool that can determine all the exceptions that can be raised in a Python function, or in any of the functions it calls, etc.? /Dan
0
1202
by: Cepheus | last post by:
Hi, I made a Windows application with C#. If you start the application directly from the Desktop, and while running the application, I raised a SecurityException and catched it in my code. So far so good. If you start the application from commandline, and you come to the same error, then the program does NOT run my catch code, but gives the...
20
674
by: Tom Groszko | last post by:
Given a try catch scenario try { dosomething(); } catch (...) { report some error } Is there any way to figure out what exception is being thrown and
24
2323
by: Steven T. Hatton | last post by:
If I understand correctly, I have no assurance that I can determine the type of a simple class instance thrown as an exception unless I explicitly catch it by name. (non-derived classes having no virtual funcitons have no rtti) That is, there is no way to do something like: try{ funct_from_3rd_party(); } catch(...){ std:err <<...
8
2724
by: Z D | last post by:
Hi, I was wondering what's the point of "finally" is in a try..catch..finally block? Isn't it the same to put the code that would be in the "finally" section right after the try/catch block? (ie, forget the finally block and just end the try/catch and put the code after the try/catch block). Or does the "finally" construct add some...
11
1471
by: Tamas Demjen | last post by:
I was shocked to learn that VC++ 2005 Beta 2 can't catch Access Violation exceptions in unmanaged code. To reproduce this, I created a minimal Win32 console application: #include "stdafx.h" int _tmain(int argc, _TCHAR* argv) { int* p = 0;
4
2029
by: Rob Richardson | last post by:
Greetings! I am working on an application that targets a Pocket PC running Windows CE and SQL Server CE. Almost all functions in the application use a Try block with a Catch block that looks like this: Try TryToDoIt() Catch e as Exception LogTheError(e)
11
1985
by: l.woods | last post by:
I want to set up my CATCH for a specific exception, but I really don't know which one of the multitude that it is. I am getting the exception now with Catch ex as Exception but I want to be more specific. I can't find any property of the exception object that tells me WHICH one it is. TIA,
7
6967
by: Mr Flibble | last post by:
Are try { //something } catch { // }
4
1826
by: Tony | last post by:
Well the subject says it all. Do I have to have it if I use classes in C++? Tony
0
7604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7660
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...
0
7962
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...
0
6275
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...
1
5498
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...
0
5217
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...
1
2101
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
0
932
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...

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.