Hi. I'm converting my own web browser use WPF from Windows XP to Windows 7.
when I test on Windows XP, It has no error and exceptions.
But I convert and test on Windows 7 with Multi-touch Library, My Browser occurred unhandled exception.
Source: PresentationCore
Message: An unspecified error occurred on the render thread.
StackTrace:
...
I have a PHP app "index.php" that, for various reasons, needs to run other PHP scripts by using include_once on that other script. That other script isn't very stable, so is there some way to do a safe include_once that won't halt the caller?
i.e.:
<?php
safely_include_once('badfile.php'); // MAY throw syntax error, parse error, othe...
I'm writing a plug-in for a geometric modeling program, and I have an abstract class that is based off a Curve object. The curve is only considered valid if it is planar, closed, and does not intersect itself.
I then have a chain of other methods that reference this curve that do things like make a surface out of it, or extrude it into...
I'm occasionally getting a ConcurrentModificationException when I iterate over a list. A Google search informs me that it's probably because I'm altering that list in another thread while iterating over it and that to make this problem go away I should use java.util.concurrent.CopyOnWriteArrayList....
... except I already am.
Apparent...
I'm running into an issue with floating point exceptions turned on in Visual Studio 2005. If I have code like this:
double d = 0.0;
double d2 = 3.0;
double d3 = d2/d;
and if I register an SEH handler routine, then I can easily turn the div-by-zero into a C++ exception and catch it. So far so good.
However, when I do this, the f...
This is a follow up from here -->multiple-sorting-on-linq-nested-method .
Basically, on let memberName = ... it is throwing this exception Method 'System.String MemberName(Int32)' has no supported translation to SQL. and I am not figuring out the solution.
Also, BLLCmo and BLLConnect actually use TWO different DataBases. The original ...
I have a background thread that uses CGBitmapContextCreate to do some drawing to a memory buffer. I believe this is causing random EXEC_BAD_ACCESS exceptions. Keyword is random.
I believe it may be my lack of understanding of CG thread safety. That is a guess, but I've checked quite thoroughly via line by line debug outputs and the bug ...
Is there a way in PHP to make sure that I get Exceptions for everything rather than errors?
Using two different methods of errorhandling leaves me uncomfortable and it feels messy. I'd prefer the Exception style method as its more OO and thus fits better with my other programming experience.
...
The typical workflow of catching an exception in action is get to the section of code where you suspect the exception of happening, select Debug/Exceptions, check Thrown for Common Language Runtime Exceptions, OK your way out of it, and continue execution.
This is a massive PITA. Is there a shortcut (or a context menu) that can be conf...
Hi all,
My app makes an outbound connection to a server using a specific source port (in anticipation of firewall problems - a hardened system will probably require ports to be specified ahead of time).
My problem is that my app makes the connection initially. However, if the connection ever breaks it will try again but the socket wil...
I am using Microsoft's DSOFile library to work with extended file attibutes and I'm having problems under Vista with non-OLE files.
The following C# code simply reads any custom attributes that are attached to a file:
private void readCustomProperties(string fileName)
{
DSOFile.OleDocumentPropertiesClass documentProperties = new O...
This is another debated subject, but this time i am searching only for the simple and documented answers. The scenario :
Let's assume the following method:
public static Hashtable<Long, Dog> getSomeDogs(String colName, String colValue) {
Hashtable<Long, Dog> result = new Hashtable<Long, Dog>();
StringBuffer sql = null;
Dog dog...
Hi I am having getting an exception when trying to initialize ActiveRecord and I cannot figure out what I am missing. I am trying to convince the company I work for to use Castle ActiveRecord and it won't look good if I can't demonstrate how it works. I have work on projects before with Castle ActiveRecord and I had never experience this...
I've heard that using exceptions for control flow is bad practice. What do you think of this?
public static findStringMatch(g0, g1) {
int g0Left = -1;
int g0Right = -1;
int g1Left = -1;
int g1Right = -1;
//if a match is found, set the above ints to the proper indices
//...
//if not, the ints remain -1
try {
...
Hi all,
I have java class with a method which gets an image from a website:
private Image image;
private int height;
private int width;
private String imageUri;
public Image getImage() {
if (image == null) {
log.info("Fetching image: " + imageUri);
try {
URL iURL = new URL(imageUri);
ImageIcon ii = new ImageIcon(iURL);
i...
Hello,
Is there a way to make a global exception-handler in Java. I want to use like this:
"When an exception is thrown somewhere in the WHOLE program, exit."
The handler may not catch exceptions thrown in a try-catch body.
Martijn
...
Not quite the same as this thread, but pretty close.
My program allows people to enter some VB or C# code which gets compiled, loaded and executed at runtime. My CompilerParams are:
CompilerParameters params = new CompilerParameters();
params.GenerateExecutable = false;
params.GenerateInMemory = true;
params.IncludeDebugInformation = f...
When a menu item is clicked in my menu an ASCX control is loaded via AJAX in my asp panel. To do this I have a method:
public void LoadControl(ControlDestination controlDestination, string filename)
{
try
{
// Load control from file
Control control = LoadControl(filename);
// Check control extends BaseFo...
What exceptions can occur when using PInvoke or are all errors handled by the method return values and it is up to the developer to check and raise exceptions if needed?
...
We create a output document (based on a template) to send to a customer for each product they buy. Templates differ per product (many products to one template), but currently all customers share the same templates
1) PRODUCTS
----------------
PRODUCT_ID (PK),
TEMPLATE_ID (FK)
2) TEMPLATES
------------
TEMPLATE_ID
3) CUSTOMERS
--------...