Questions tagged [exception]
An exception is an unusual condition that requires deviation from the program's normal flow. Normally, an exception should not result in total failure, but instead be attended by an exception handler. Exception handling is a built-in construct in many programming languages. Usually, exceptions are handled by unwinding the stack, thus rolling back to a defined state outside the exception's scope, and then invoking a handler block or routine.
exception
53,788
questions
0
votes
0
answers
10
views
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
Here the error:
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
at org.hibernate.internal.ExceptionConverterImpl.convert(...
0
votes
0
answers
33
views
Why not BOTH Debug.Assert and Exception Throwing
This Debug.Assert vs Exception Throwing has been beaten to death. I understand the difference. Assert is a programmer error; an exception is for an external unexpected condition. I get it.
But, in the ...
0
votes
1
answer
25
views
Python: init exception from another (like raise ... from but with no raise)
I am working on a piece of FastAPI app code that (already) has some exception handling, where handlers receive exceptions as function arguments, some exceptions are converted into other exceptions and ...
-1
votes
3
answers
40
views
Adapt exception type of generic throwing iterator
I have an interface ThrowingIterator, which follows the general contract of Iterator, except the hasNext() and next() methods can throw exceptions:
public interface ThrowingIterator<T, E extends ...
0
votes
0
answers
27
views
Symfony Form with special characters
I have a Symfony 6.4 Webapp and using the Form Builder.
This is working perfectly, but I have an external data source. (Active Directory)
If the form have to load an entry with special characters (in ...
0
votes
0
answers
69
views
C++: unable to catch fprintf exception
my application crashed on release on a fprintf on null stream, and even if I added the catcher:
#include <windows.h>
#include <iostream>
#include <errhandlingapi.h>
...
-1
votes
0
answers
25
views
unable to handle banner_timeout exception in paramiko
I am sure I am misundrstanding something, but the following code should send an email if there is an issue with the creation of an sftp session via paramiko-- however it appears as if neither the ...
0
votes
0
answers
52
views
How to Show User Dialog on UI Thread for Global Unhandled Exceptions in .NET MAUI with WinUI 3?
I'm migrating a Xamarin.Forms project with UWP to .NET MAUI with WinUI3 (multi project app).
I need to implement a similar global exception handling logic in my MAUI project with WinUI 3. Although I'm ...
1
vote
1
answer
21
views
Codeigniter failing to load CI_Exceptions
I have an codeigniter 3 app deployed to an ubuntu server.
When one of my models (assumably) hits an error, I am getting this message:
Fatal error: Uncaught Error: Class "CI_Exceptions" not ...
1
vote
1
answer
44
views
Why RSA `dofinal` returns `ILLEGAL_VALUE` in javacard applet?
I'm trying to encrypt TempBuffer using RSA private key (64 bytes length) and send it to output buffer:
rsaCipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1_OAEP, false);
rsaKey = new KeyPair(KeyPair....
0
votes
2
answers
83
views
How can I handle invalid data type exception and stop program execution?
I have a problem, I am studying exceptions and apparently I misunderstood something.
int n;
try {
cout << "enter value: " << endl;
cin >> n;
}
catch (exception& ex) ...
1
vote
1
answer
58
views
FileNotFoundException concerning System.Diagnostics.EventLog DLL when starting the simplest possible Windows Service with .Net Core 8
I have already developed many Windows services in .NET 4.x, but this is the first time I use .NET Core 8.
Program.cs:
using MyService;
IHost host = Host.CreateDefaultBuilder(args)
....
-1
votes
0
answers
24
views
Python : add exception context [duplicate]
Say I want to raise an exception with extra information for handling; what would be the best practice for that?
I came up with the following, but it smells fishy to me:
def internal_function():
...
0
votes
0
answers
41
views
New FileStream is closed immediatly
I have a long running process handling imports. The imports went fine for a long time, but suddenly suddenly got an exception, even though I did not change anything. Importing the file uses the ...
-1
votes
2
answers
61
views
How can I set up an alert or beeping sound when my code breaks? (In Python ideally)
I am running some code for a robot, and it will keep running until I manually kill the process. OR if the code unexpectedly hits an error like a syntax error or other such errors/exceptions and ...