I have a JSP, which includes another JSP via <jsp:include>. I also have (what I think is) a standard error page setup. The problem is that when an exception occurs inside the included file, it doesn't "bubble up" to the including JSP. Instead, it inserts the error page mid-way through processing the included JSP.
Strangely enough, it...
This question relates to this question which I asked earlier this week.
The answer given was correct, except I forgot to mention we were not using WCF, but regular XML Web Services, where there's no [DataContract] - all methods are simply prefixed with [WebMethod].
Is there any similar way of handling exceptions using this service? The...
have this method call
->
simpleJdbcTemplate.queryForInt(sql,null);
->
queryForInt() method in the springs SimpleJdbcTemplate throws a DataAccessException which is a runtime exception. i want to propegate exceptions to the view tier of the application
since Spring frame work Wraps Checked Exceptions inside RuntimeExceptions i ...
Hi there,
Whenever I run my program, I get: NullReferenceException was unhandled, Object Reference not set to an instance of an object.
When I start the program, I have a form appear called MaxScore where the user enters the max score and presses OK. In the OK event, I call a method from MainForm to update the maxGameCountLabel on MainF...
I know that exceptions have a performance penalty, and that it's generally more efficient to try and avoid exceptions than to drop a big try/catch around everything -- but what about the try block itself? What's the cost of merely declaring a try/catch, even if it never throws an exception?
...
import sys
try:
raise "xxx"
except str,e:
print "1",e
except:
print "2",sys.exc_type,sys.exc_value
In the above code a string exception is raised which though deprecated but still a 3rd party library I use uses it.
So how can I catch such exception without relying on catch all, which could be bad.
except str,e: doesn't cat...
I am trying to decrypt a file in Java which was encrypted in C# using Rijndael/CBC/PKCS7. I keep getting the following exception:
javax.crypto.BadPaddingException: pad block corrupted
at org.bouncycastle.jce.provider.JCEBlockCipher.engineDoFinal(Unknown Source)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at AESFileDecrypter....
Hi guys!
Please help me understand why this function throws an exception when it reaches fclose :
void receive_file(int socket, char *save_to, int file_size) {
FILE *handle = fopen(save_to,"wb");
if(handle != NULL) {
int SIZE = 1024;
char buffer[SIZE];
memset(buffer,0,SIZE);
int read_so_far = 0;
int re...
IDE = VS7 or 2002
Hi all, I have a really weird problem here. The code doesn't appear to be executing as expected. I'm running this through the debugger and it's performing really strangely.
I have made sure that the Virtual Directory is using ASP.NET 1.0.3705.
The code follows and I explain what the debugger shows me as the executi...
In C++, what is the difference between the following examples?
Re-throw pointer:
catch (CException* ex)
{
throw ex;
}
Simple re-throw:
catch (CException* ex)
{
throw;
}
When the re-throw is caught, will the stack trace be different?
...
I have an application utilizing lots of AJAX requests (different actions are triggered via XHR requests). Some of those calls may result in exceptions. Each time I have to display an error message to the user. How can I organize error handling in this case?
...
Hello!
I know that one can define an 'expected' exception in JUnit, doing:
@Test(expect=MyException.class)
public void someMethod() { ... }
But what if there is always same exception thrown, but with different 'nested'
causes.
Any suggestions?
...
Hi, I have implemented a LINQ to SQL based RoleProvider, when I assign role to a user following exception is thrown while AddUsersToRoles method is called. I have defined a composite primary key userid & roleId on this table, it still throwing this exception:
Can't perform Create, Update or Delete
operations on 'Table(UsersInRole)'...
public void populateNotesFromFile()
{
try{
BufferedReader reader = new BufferedReader(new FileReader(DEFAULT_NOTES_SAVED));
String fileNotes = reader.readLine();
while(fileNotes != null){
notes.add(fileNotes);
fileNotes = reader.readLine();
}
reader.close();
}
c...
I want to run this piece of code
Bitmap grayImage = (Bitmap)img.Clone();
for (int x = 0; x < arr.GetLength(0); x++)
{
for (int y = 0; y < arr.GetLength(1); y++)
{
int col = arr[x, y];
Color grau = Color.FromArgb(col, col, col);
grayImage.Set...
I'm wondering where I can find some information about exceptions that are thrown by the SharePoint object model. Unfortunately regarding this, the documentation on MSDN is not very useful as the documentation of many methods is lacking information about what exceptions might be thrown and in which case they will be thrown.
So where do ...
Could someone explain to me why it is considered inapropriate to have a try-catch in the main() method to catch any unhandled exceptions?
[STAThread]
static void Main()
{
try
{
Application.Run(new Form1());
}
catch (Exception e)
{
MessageBox.Show("General error: " + e.ToString());
}
}
I have t...
I get the following exception when calling BitmapMetadata.GetQuery("/app13/irb/8bimiptc/iptc") on about 1% of JPEGs I have tried this on. What could be causing this and what can I do to fix it? (I have tried Googling but I can only find one relevant result asking the same question but with no answer.)
System.OverflowException:
The image...
Hi,
My app (EasyJob) causes an access violation error on exiting. This only happens on some systems, mostly Vista, but it has happened on some XP boxes. The application is written in VB6.
After finding a system that shows this behavior, I ran DebugDiag on my process and got this report:
Function Arg1 Arg2 Arg3
0x04246c81 ...
Hello,
Let's say I have a simple class
public class Person
{
public string Name { get; set; }
private int _age;
public int Age
{
get { return _age; }
set
{
if(value < 0 || value > 150)
throw new ValidationException("Person age is incorrect");
_age = value;
}
}
}
Then I want to setup a bi...