I have a Silverlight 3 app deployed at multiple customer sites. Customers are occasionally getting a System.Reflection.TargetInvocationException with an inner exception of Async_ExceptionOccurred.
What is the cause of this? Is it just unreliability in the communications with the server? Is there any way to configure WCF to do an automat...
I'm developing a program that would require huge amount of memory, and I want to catch when out-of-memory exception happens. I had heard this is not possible to do, but curious if there is any development on this end.
...
If I run the following test, it fails:
public class CrazyExceptions {
private Exception exception;
@Before
public void setUp(){
exception = new Exception();
}
@Test
public void stackTraceMentionsTheLocationWhereTheExceptionWasThrown(){
String thisMethod = new Exception().getStackTrace()[0].getMe...
Hi all,
I have the following interface declaration:
public interface SomeInterface {
void someMethod() throws Exception;
}
I use a third party to generate an implementation of this class (JavaCC - for the curious)
The generated class looks naively like this:
public class SomeClass implements SomeInterface {
public void so...
Hello,
I am upgrading a project from Delphi 2009 to D2010 and came across the following Internal Error
[DCC Fatal Error] frm_Test.pas(381):
F2084 Internal Error: C15700
when calling
(ILocalizable(TMyProgram.MainForm.AbilitiesForm)).Localize('c:\test.txt');
Here are the definitions:
ILocalizable = interface
['{4DF36053-2651...
When coding in C# I like not to handle exceptions because it makes it easier to figure out where and why things went wrong. However, I can't give anyone a program that doesn't handle exceptions.
Can I somehow force Visual Studio to break on every exception, including those thrown inside try/catch blocks?
...
Hi,
when I use XamlReader.Load() with an invalid XAML string, the resulting XAMLParseException is not caught although beeing in a try-catch-block:
try
{
UIElement xamlCode = XamlReader.Load(XamlText) as UIElement;
}
catch (Exception ex)
{
ErrorText = ex.Message;
}
The code is called from the Tick-Event of a Disp...
IllegalStateException is often used in Java when a method is invoked on an object in inappropriate state. What would you use instead in Python?
...
I am trying to write code for an assignment for the c# intro class at my college but am ahead and am running into problems. I am getting a NullReferenceException when i run the program - i think the problem is coming from the fact that i am creating a 'Line' which contains the 'Point' class... i have tried for 3hrs to fix this - any help...
I need to iterate a List<myClass> in a jsp. This is how I obtain the list:
(when I commented it, the page loaded just fine).
<%
List<myClass> pjList = null;
StringBuffer ejbQuery = new StringBuffer();
EntityManagerFactory emf = Persistence.createEntityManagerFactory("myPersistence");
EntityManager em = emf.cre...
Im getting Java exception like: java.net.MalformedURLException: no protocol
My program trying to parse XML string by using
Document dom;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
dom = db.parse(xml);
The XML string contains:
String xml = "<?xml version=\"1.0\" ...
In my code I have a method with multiple catch statements, which perform all the same statement. I'm not sure this is the correct way to implement this. How would you do this?
public void LoadControl(ControlDestination controlDestination, string filename, object parameter)
{
try
{
// Get filename with extension
...
hi all,
I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets
corrupted, what is the reason an how to avoid it?
xmldocument x= new xmldocument();
x.open();
// change a value of the node every time
x.save();
x=null
this i...
I keep getting an error in the following code when I close the print preview window or move the print preview window. I can't seem to understand why this is happening. It happens on the g.DrawString() line. As far as I can tell nothing has been disposed of either.
protected override void OnPaint(PaintEventArgs e)
{
Graphi...
Should I throw NotImplementedException() on default: if I have cases for all possible enum types?
...
I'm learning how to work with Oracle and am using C#/Visual Studio. Just as a reference, I'm following this simple tutorial, and have all the prerequisites done (database installed and ODAC with dev tools installed). The following code that's supposed to create an object for connection to a database throws an exception saying "Object ref...
I must have changed something somewhere, but damned if I can figure out what it is.
I have a DAL that handles all my data access (as is a DAL's wont) to my SQL Server DB. This includes the Entity Model, the repository classes and the connection string in the App.Config file.
Somewhere along the piece, I must have changed something and...
Hi,
Why is this code correct:
try
{
} catch(ArrayOutOfBoundsException e)
{
}
and this wrong:
try
{
} catch(IOException e)
{
}
This code is wrong because in the try-body never an IOException is thrown, but in the first body there is also never throw a ArrayOutOfBoundsException. And the first code-piece is correct. Why?? Can I ...
I'm Trying to develop a project that interacts with Live Messenger (8.5, 9.0 and higher)
I can't get it to work in windows XP, whenever i try to instantiate a MessengerClass (available in the messengerAPI) it gives me an exception, however, in windows vista, this error doesn't happen (same exact code, tested in more than one XP and more ...
HI Guys,
I have created a windows service which spawns three threads.The first thread wakes up every 15 sec, the second thread wakes up every min. and the third thread once in a day.
My Code looks something like this:
var timer1 = new Timer();
timer1.Elapsed += ProcessTimerEvent1;
timer1.Interval = 60000;
...