Hi,
In a C++ project, I use the JNI invocation API to launch a JVM. I've done a little wrapper arount the JVM so I can use all the needed parts in a OO fashion. So far that works great.
Now, if the JVM does not start (JNI_CreateJavaVM returns a value < 0) I'd like to raise an exception within my C++ code.But if I throw an exception aft...
I have to create a set of wrapping C++ classes around an existing C library.
For many objects of the C library, the construction is done by calling something like britney_spears* create_britney_spears() and the opposite function void free_britney_spears(britney_spears* brit).
If the allocation of a britney_spears fails, create_britney_...
Suppose you have an method on an object that given the some input alters the objects state if the input validates according to some complex logic.
Now suppose that when the input doesn't validate, it can be due to several different things, each of which we would like to be able to deal with in different ways.
I'm sure many of you are t...
I've hunted around for some definitive documentation on this but haven't had much luck finding any.
Basically - the question is - for which HTTP Status codes coming back from the server will HttpWebRequest.GetResponse() generate a WebException after doing something like say, a POST?
Specifically - will it generate a WebException for an...
Is there any way of handling -- and continuing from -- an exception in an iterator while maintaining the foreach syntactic sugar?
I've got a parser that iterates over lines in a file, handing back a class-per-line. Occasionally lines will be syntactically bogus, but that doesn't necessarily mean that we shouldn't keep reading the file....
Actual question(s):
What happens "in Windows" when a program crashes from an uncaught exception?
Is there a dll function, which I can hook, to log some basic information about a crash?
Context:
I am planning to write a program which will collect some very basic information about any applications which crash on my local pc. I was hopi...
I think I've encountered a bug in Params::Validate, but I'm not sure whether I identified the problematic code piece correctly. The code in question failed to pass exceptions up the chain (using Try::Tiny), so I started debugging and found out that a class used inside the try block has a destructor. This destructor calls object methods w...
I'm writing a reactive software, which repeatedly recieves input, processes it and emits relevant output. The main loop looks something like:
initialize();
while (true) {
Message msg,out;
recieve(msg);
process(msg,out);
//no global state is saved between loop iterations!
send(out);
}
I want that whatever error occu...
Hi every one,
I do a condition with a value when it is null and when it is not null.
The time where this value is null i got the java.lang.NullPointerException.
How could i deal with this in order to dismiss this exception.
I need the condition when the value is null and when it is not.
Thanks for help.
...
We're developing software that allows our custom scheduling application (master role) to synchronize with Microsoft Exchange Server 2010/2007 (slave role). Our solution is based on .NET 4.0, the EWS Managed API and Parallel Fx, and of course our own C# code. We've taken special care of the fact that "ExchangeService" class instances are ...
I am beginning to think I am doing something wrong. I mean they did place System.String.IsNullOrWhitespace finally but no ArgumentEmptyException class.
public FilterItem(string name, IEnumerable<string> extensions)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentNullExce...
On my local machine the script runs fine but in the cloud it 500 all the time. This is a cron task so I don't really mind if it takes 5min...
< class 'google.appengine.runtime.DeadlineExceededError' >:
Any idea whether it's possible to increase the timeout?
Thanks,
rui
...
So I'm running out of ideas to try to actually get a client to connect to the SOAP service I'm running through axis2.
I tried two methods, one was to use wsdl2java to build the stub and associated client side classes, and then write a Client class that build the requests messages and sends them through the Stub. The other way was to use...
I have a set of web services (the server), and an app which consumes this (client). In this sort of relationship, should the server always throw exceptions (ie in the throw block, rethrow the caught exception), and the client catch this. Exceptions which the server can handle, it will deal with and not rethrow, but everything else will b...
I've got a standard 'dynamic dictionary' type class in C# -
class Bucket : DynamicObject
{
readonly Dictionary<string, object> m_dict = new Dictionary<string, object>();
public override bool TrySetMember(SetMemberBinder binder, object value)
{
m_dict[binder.Name] = value;
return true;
}
public over...
Hi,
I want to catch an exception, that is nested into another exception.
I'm doing it currently this way:
} catch (RemoteAccessException e) {
if (e != null && e.getCause() != null && e.getCause().getCause() != null) {
MyException etrp = (MyException) e.getCause().getCause();
...
} else {
...
I'm trying to crash my WPF application, and capture the exception using the above new .NET 4 attribute.
I managed to manually crash my application by calling Environment.FailFast("crash");.
(I also managed to crash it using Hans's code from "How to simulate a corrupt state exception in .NET 4?".)
The application calls the above crashin...
I am getting:
System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
when I try to use strongly-typed links int asp.net mvc.
My app is running under full-trust
...
I am handling errors via my global.asax in this method:
Dim CurrentException As Exception
CurrentException = Server.GetLastError()
Dim LogFilePath As String = Server.MapPath("~/Error/" & DateTime.Now.ToString("dd-MM-yy.HH.mm") & ".txt")
Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(LogFilePath)
sw.WriteLine(DateTime.Now....
Hi,
Trying to delete a subkey tree: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.hdr. .hdr subkey has one subkey, no values. So I use this code:
RegistryKey FileExts = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts");
RegistryKey faulty = FileExts.Op...