Hi! I have a problem in my current Zend Framework application.
In my Bootstrap I register these routes:
protected function _initRouter()
{
$this->bootstrap("FrontController");
$frontController = $this->getResource("FrontController");
$route = new Zend_Controller_Router_Route(
":module/:id",
array(
"controll...
Hey,
I've just started developing Android applications. I'm having a little problem with networking. If I run the following code I get an "unknown error" exception message:
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.ClientProtocolException;
import.org.apache.http.client.methods.HttpGet;
import...
I have a biztalk (2006 R2) map which uses an class to provide for some custom logic that we couldn't achieve neatly through the existing functoids.
When an exception is thrown from one of the methods of this class the exception detail is, unfortunately lost (at least as far as I can see), The transform shape simply throws an exception i...
I'm trying to use a solution for serializing exceptions using jaxb. (http://forums.java.net/jive/thread.jspa?messageID=256122)
The class I need to implement for that solution requires referencing the following com.sun classes.
import com.sun.xml.internal.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl;
import com.sun.xml.in...
I am trying to figure out the best practices when loggin exceptions.
So far, I am logging every time I catch an exception. But when a lower lever class catches an exception (say, from the database layer), and wraps it in our own application exception - should I also log the original exception there, or should I just let the upper lever ...
I get a warning that BaseException.message is deprecated in Python 2.6 when I use the following user-defined exception:
class MyException(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return repr(self.message)
This is the warning:
DeprecationWarning: BaseException.message has been dep...
I’m working on trying to port an ASP.NET app from Server 2003 (and IIS6) to Server 2008 (IIS7).
When I try and visit the page on the browser I get this:
Server Error in ‘/’ Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the ...
I'm currently using a very simple MVC framework, Bear Bibeault's Front Man, which, for those not familiar, is pretty similar to Spring MVC (in concept at least). One of the issues I'm having is how to handle exceptions properly.
I am currently doing something like this,
try {
//do something
}catch (Exception ex) {
logger.error(...
I want the api of my module to only throw MyPackageSpecificException whenever anything goes wrong and the module unable to perform its task. (The original exception will be given as the cause of the MyPackageSpecificException).
Now, for one constructor I needed an URL as a parameter to locate a resource. I would also like to make an alt...
Catching an exception that would print like this:
Traceback (most recent call last):
File "c:/tmp.py", line 1, in <module>
4 / 0
ZeroDivisionError: integer division or modulo by zero
I want to format it into:
ZeroDivisonError, tmp.py, 1
...
Following code should throw exception to prevent adding duplicate collection item.
ICollection<T> collection = new List<T>();
public void Add(T item)
{
if (collection.Contain(item))
{
throw new SomeExceptoinType()
}
collection.Add(item);
}
What standard exception type is the most apropriate?
...
Is it possible to change this code, with a return value and an exception:
public Foo Bar(Bar b)
{
if(b.Success)
{
return b;
}
else
{
throw n.Exception;
}
}
to this, which throws separate exceptions for success and failure
public Foo Bar(Bar b)
{
throw b.Success ? new BarException(b) : new FooException...
I'm trying to upgrade from BouncyCastle bcprov-jdk14-124.jar (oooold) to bcprov-jdk14-143.jar. When I replace the old jar with the new jar and build everything, my software will no longer establish an SSL connection, failing with a javax.net.ssl.SSLException: Received fatal alert: illegal_parameter. Googling for "bouncycastle javax.net...
Hey,
I'm trying to write a SAX parser for an XHTML document that I download from the web. At first I was having a problem with the doctype declaration (I found out from here that it was because W3C have intentionally blocked access to the DTD), but I fixed that with:
XMLReader reader = parser.getXMLReader();
reader.setFeature("http://...
Has anyone ever seen this odd error when attempting to load an applet? I get this in jconsole, although the applet activity is pretty plain. I get this exception after
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
...
What's the deal with CommunicationExceptions in a system using WCF? I have a client communicating with a server through WCF using SOAP - all async communication. Occasionally I get a CommunicationException thrown in my face - without seeing any reproducible pattern on why and when this happens.
However; I am able to continue running th...
Hey everyone,
I'm working on a WPF system which hooks onto an old legacy database using the Entity Framework. We hook onto a backup of the live data when debugging and an empty database to run tests against. I'm receiving the following error only when trying to delete from a backup of the live data.
This code:
License license = ReadLi...
From this question, I'm now doing error handling one level down. That is, I call a function which calls another larger function, and I want where it failed in that larger function, not in the smaller function. Specific example. Code is:
import sys, os
def workerFunc():
return 4/0
def runTest():
try:
print workerFunc()
...
Example:
myEnumerable.Select(a => ThisMethodMayThrowExceptions(a));
How to make it work even if it throws exceptions? Like a try catch block with a default value case an exceptions is thrown...
...
I have series of functions with different argument signatures:
public void function1 (string s1, string s1, string s3, string s4) {...}
public void function2 (int i1, int i2, string s3, string s4) {...}
public void function3 (int i1, string s2, int i3, string s4) {...}
.
.
etc //some 30 odd functions
calling each function may thro...