Tagged Questions
2
votes
3answers
104 views
C# throw statement redundant?
I have a code that looks like this (sorry for the Java bracket style):
class SomeClass {
public static void doSomethingRisky() {
try {
SomeRiskyFunction();
} catch ...
1
vote
5answers
90 views
How do I find the exception type of an exception that gets thrown in C#?
I am using a library that doesn't seem to document the exceptions. This library is used to communicate with a product the company makes. I want to be able to differentiate between the exceptions that ...
3
votes
2answers
31 views
What exceptions can occur when saving an XDocument?
In my C# application I'm using the following statement:
public void Write(XDocument outputXml, string outputFilename) {
outputXml.Save(outputFilename);
}
How can I find out which exceptions the ...
5
votes
0answers
132 views
.net c# exception handling fails in 64 bit mode
I am facing a problem in my c# webservice application. Exceptions are not handled at a certain point anymore. The application simply stops without any further messages/faults exceptions. This is what ...
1
vote
2answers
69 views
How To Use Exception Manager Enterprise Library 6.0
When using Enterprise Library 6.0, this error occurs in the code below:
bool rethrow = ExceptionPolicy.HandleException(ex, "ReplacePolicy1")
"Must set an ExceptionManager in the ExceptionPolicy ...
1
vote
2answers
30 views
Chaining Parallel Tasks to an End Condition or Error Condition
I'm trying to wrap my head around some of the syntax and structure for parallel tasks in C#, specifically around chaining multiple tasks and handling errors.
The specific sequence of steps I'm ...
1
vote
0answers
38 views
An asynchronous operation cannot be started at this time Exception occurs on calling webservice in mvc?
In my ASP.NET MVC 3 project I'm calling a web service for login authentication. But it throws an exception:
Exception Details:
An asynchronous operation cannot be started at this time. ...
0
votes
2answers
82 views
File being used by another process even if closed it before
I don't understand why the same code runs successfully on a 32-bit system, but trying to run it on a 64-bit system, always gives an error:
File being used by another process
I declare a file ...
2
votes
1answer
71 views
Handling Data Access Layer Exception in MVVM using Inversion on Control
I'm studding MVVM in C#.
I want to use Inversion of Control (IoC). I use the framework Unity.
I don't understand how to handling exception that could be raised from Data Access Layer.
Here a little ...
1
vote
3answers
40 views
How to avoid 'Unassigned Local Variable' defined inside a try-catch block
This is one error that I regularly face. Although I manage to circumvent it using some way or another, it really annoys me.
In the code snippet below, I want to safe guard against exceptions from ...
0
votes
3answers
55 views
having trouoble executing a “cmd” or batch file from c#
i need to run a batch file (or a cmd) from c# . my code is this simple:
Process.Start(@"C:\b.bat");
Process.Start(@"cmd.exe");
i have also tried Executing Batch File in C# , and many other sites ...
7
votes
3answers
201 views
Is there a Jeff Atwood's User Friendly Exception Handling (Or Similiar) for C# / Winforms .Net 3.5+?
We have a .Net 3.5 C# / Winforms desktop application with a very limited size/scope/userbase (40 users). I need a way to gather more information about unhandled exceptions, but I don't believe I need ...
0
votes
1answer
22 views
How to read Google.GData.Client.GDataRequestException
I am writing a youtube upload software. Actually my question is generic here.
The Google.GData.Client produces an exception. But I don't know how to reach in order to write ?
I mean how do I access ...
1
vote
3answers
31 views
Change catch (COMException ce) to catch (COMException)
I have the following code:
try
{
retval = axNTLXRemote.IsUnitPresent(_servers[0].IPAddress, 1, _servers[0].RemotePort, _servers[0].CommFailDelay * 1000);
}
...
0
votes
1answer
30 views
Localization of Exception Message inside class files?
If a class file contains some initial validation and throws an Exception in the case where validation fails,
is it considered good practice to enable localization inside the class files for the ...