All Questions
Tagged with exceptionhandler or exception
54,342 questions
-1
votes
1
answer
40
views
Laravel customize all exceptions thrown
Im trying to make a little change in exception log and render in laravel 11.
I want to add an uuid to the errors.500 blade and log it right before the log, but i really dont know how to, laravel docs ...
0
votes
1
answer
28
views
How to catch one of many exceptions in the code and keep the original message?
I have an azure function that is currently listening to a topic in event hub.
We receive several json as events, and we need to implement a decorator to wrapp all the possible exceptions that can ...
0
votes
0
answers
27
views
Rate limitations and slash commands with Discord API (discord.py)
I've been encountering an issue recently- specifically with slash commands. Both with syncing them and actually using them.
So, as I understand it, whenever you make requests to the Discord API, you ...
1
vote
0
answers
13
views
How to disable default ValidationException handler? [duplicate]
I have a store method in DocumentController. This method use custom laravel FormRequest to validate request data. A try catch block in this store method should handle the ValidationException by ...
-1
votes
0
answers
39
views
try catch block does not catch the exception [closed]
I have a simple try-catch block and cannot find, why the result remains an 'uncaught' exception / My exception-handling does not work/grip.
when connecting to me database I use:
<pre>
try {
$...
-1
votes
0
answers
57
views
C++ error handling in assembly level, why it can know jumping to the correct line of asm code? [duplicate]
In this sample:
https://godbolt.org/z/bx8oeWrxd
square(int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov edi, 8
...
0
votes
0
answers
28
views
Exception "System.IO.IOException" in Npgsql.dll
My project uses .NET Framework 4.0.
During the execution of a program for a certain operation, a message appears in the debugging console: An exception was raised: "System.IO.IOException" in ...
1
vote
1
answer
33
views
CASWriteUnknownException in Cassandra 4.1.7 After Changing Replication Factor to 3
We are encountering the following error in our Cassandra 4.1.7 cluster after updating the replication factor from 1 to 3 in a 5-node cluster:
below is the error:
com.datastax.oss.driver.api.core....
0
votes
0
answers
10
views
configuring karrigell logging to write uncaught exceptions
I am managing a third-part app made with python's framework Karrigell.
I have added a new logger, my_logger, which is declared and instantiated in a file called my_logging.py
I see that the logger can ...
0
votes
1
answer
44
views
Do custom C++ exceptions from a module work in GCC (14.2.0)?
Are C++ modules implemented in GCC such that I can create a custom exception in a module for use in another file? I get the following error with GCC 14.2.0 via MinGW/MSYS:
x86_64-w64-mingw32-gcc -std=...
0
votes
1
answer
25
views
NotImplementedError when using threading with a keyboard and mouse listener with pynput
Here is the keyboard and mouse listener part of my code:
python
def mouse_listener(scroller):
"""Listens for mouse scroll events to scroll clipboard history."""
...
0
votes
1
answer
34
views
Flutter firebase exception not being caught by try-catch block
I am trying to implement simple login using flutter and firebase(just started learning). The user-not-found error is not being caught by the try-catch block in the code.
Code in Question
TextButton(
...
0
votes
0
answers
30
views
this.focusInsets = null [duplicate]
I made a class in which I adjust the UI for all JSliders to my liking, but when running my program, I intermittently receive the following error:
Exception in thread "AWT-EventQueue-0" java....
0
votes
0
answers
24
views
Postgresql: How to catch broken SQL in function [closed]
I am trying to make a simple plpgsql function to catch sql error.
FIXED MY own script.
(notable. Do not use replace function. It will not error correctly if fed broken code to replace non broken ...
-1
votes
0
answers
22
views
ElementNotInteractableException: element not interactable In selenium - Java
I have a translation modal page, where i am trying to translate a particular text, The english translation of the text is displayed in the first row, and the pointer events are not allowed (ie pointer-...
0
votes
1
answer
28
views
Difference Between Throwing AuraHandledException and Custom Exception in Apex Aura-Enabled Methods
In Salesforce documentation, it is mentioned that Aura-enabled Apex methods should throw an AuraHandledException to propagate user-friendly error messages to the client. However, I have a custom ...
0
votes
1
answer
51
views
Is it a good idea to nest custom exceptions? [closed]
I have a class that can throw a very rare exception that is very particular to that class.
I want to create a custom exception for it, but I ponder about the best location for this class.
The way I ...
1
vote
1
answer
63
views
Error with custom exception in C++ module (conflicting definition of __cxa_throw)
I get the following error when creating a custom exception in a C++ module:
C:/Sync/Engine/Chorus/Base/win_9x.cpp:600:59: error: conflicting declaration of C function 'void __cxa_throw(void*, void*, ...
0
votes
0
answers
42
views
InvalidCastException when using <Span> to format label text in MAUI
Can I make the <Span/> elements inherit styles from parent <Label/> or freely apply styles in some way?
I've been trying to use <Span/> elements to format <Label.FormattedText/>...
0
votes
0
answers
14
views
handle exception thrown by inner function in Unit test using xUnit
XML Parsing function is as follows:
public async void ParseXML(XMLReader reader)
{
if(await reader.ReadAsync() && reader.Name == "Node1")
{
while(await reader.ReadAsync())
...
0
votes
1
answer
29
views
Cucumber (Java) - Converting Checked Exceptions to Runtime Exceptions - Is this a good idea?
The testing framework that I am working on is based on Cucumber and Selenium in Java. The codebase contains a lot of base/common methods that perform certain actions and these methods throw checked ...
1
vote
1
answer
76
views
.NET Exception serialization no longer working without legacy pattern, Newtonsoft.Json - intentional?
This question refers to code which still uses Newtonsoft.Json. Following tests also made use of System.Text.Json.
I finally wanted to remove the obsolete pattern, with [SerializableAttribute], ...
1
vote
1
answer
60
views
System.IO.InvalidDataException: 'The archive entry was compressed using an unsupported compression method.'
I am using ASP.NET Core 6.0. I have an API which returns compressed data. Simplified version of my code looks like this:
[HttpPost("[action]", Name = "GetData")]
public ...
0
votes
0
answers
45
views
From an exception catch block, seems file write is not happening
I want to update a file from the catch block, just a few bytes write. Write() seems to pass, but contents not there. Basically keeping a count of exceptions.
My filesystem is strange one, PJFS in ...
0
votes
1
answer
31
views
IntelliJ Exception in thread "main" java.lang.UnsupportedClassVersionError:
after 2 days I still haven't been able to solve the error. This is how I set up the project, but the error is still there. I've read many guides around to solve it, but the situation is always the ...
0
votes
1
answer
44
views
"key not present in the dictionary" Exception despite actually existing
I have a Dictionary<FileInfo, FileStream>
Doing some tests with it. I have a single item in the dictionary. The FileInfo is X:\Thumper\levels\Basics3\sequin.master. But when I try to obtain that ...
1
vote
1
answer
38
views
Can Polars with calamine engine be coerced into failing more gracefully?
I have 10s of thousands of excel files to which I'm applying validation using Polars. Some excel files have a problem that spawns an index out of bounds panic in the py03 runtime, when using engine=...
0
votes
1
answer
58
views
java.sql.SQLException: while preparing SQL
I have this method in java:
@Retry
@SqlQuery("""
WITH IdsGrouped AS (
SELECT /* comment */
record_key,
max(...
-2
votes
1
answer
58
views
Unable to capture exception in task
I have a method responsible for enabling and disabling various options of a program based on access to certain databases. The system checks the connections to each one separately and makes the ...
-1
votes
0
answers
53
views
Problems with process kill by WMI Terminate method (exception)
I will, by python, kill a process (by usage of WMI)
How I have to do this is in principle clear for me:
import win32com
import subprocess
import time
name_app = "wordpad.exe"
path_to_app = &...
-2
votes
0
answers
69
views
Telerik OpenAccess: Change operation canceled by user [duplicate]
I'm working on a C# application, using Telerik OpenAccess to perform modifications on an SQL-Server database.
While trying to set the status of an object ("Status" is one of the columns in ...
-2
votes
1
answer
123
views
"Change operation canceled by user" => what does Telerik OpenAccess mean by that?
I'm working on an application, based on another application, and both are based on Telerik OpenAccess for reading an SQL-Server database.
Regularly, my customer is experiencing the following exception:...
1
vote
1
answer
30
views
ExceptionHandler is registered but never entered on occuring Exception
I have a net8 Microservice written in c#.
I want to use the IExceptionHandler Middleware but the Handler ist never called and the exception is returned to the Endpoint-Call.
The Handler:
public class ...
0
votes
2
answers
37
views
Print calling class and method if class does not implement method
Say I have
public class A {
public void myMethod() throws Exception {
}
}
public class B extends class A {
}
If I now have an instance of B and call myMethod() which throws an exception, the ...
1
vote
0
answers
39
views
php-cgi.exe crashing under IIS - how to determine which php code is running during crash
I'm running PHP 8.3.12.0 NTS under IIS on Windows Server 2019. I occasionally get an error in the Windows Application event log that php-cgi.exe has crashed:
Faulting application name: php-cgi.exe, ...
0
votes
0
answers
24
views
Postgresql Procedure not getting called from spring boot 3.3 but database connection has established successfully
I am not able to call a stored procedure from Spring Boot 3.3, but I am able to establish a database connection use fetch queries.
When calling the stored procedure, I am getting this error:
Error ...
0
votes
1
answer
58
views
How to log all Java exceptions on creation?
In some cases exceptions being thrown are causing crashes in native library that we use before they get to be logged anywhere. So waiting for UncaughtExceptionHandler to log them won't work. Even ...
0
votes
1
answer
56
views
Java method declared to throw IOException not propagating the exception up the call stack
Here is the method:
(388) protected String getExtension(BufferedInputStream stream) throws IOException, MimeTypeException {
(389) TikaConfig config = TikaConfig.getDefaultConfig();
(390) MediaType ...
0
votes
1
answer
33
views
How do I properly handle exceptions in Python without losing the traceback information?
I'm working on a Python application where I need to gracefully handle exceptions and log useful information for debugging purposes. Specifically, I want to catch exceptions that occur during runtime, ...
1
vote
1
answer
61
views
Is there any built-in exception type for a boneheaded exception in .NET?
I have the following code in a shared component:
public class MyClass {
public void DoWork() {
// ...
if (someConditionWhichShouldAlwaysBeFalse) {
throw new ...
2
votes
3
answers
97
views
Uncaught Exception, even with Try Catch
After searching on SO, I could not find an answer to this problem. All of the questions I saw, the error was still being caught. I'm having the inverse problem. No matter how I refactor the following ...
2
votes
1
answer
94
views
Calling method missing in async stack trace
I have the following code in a WPF .NET 8 application.
When the exception is hit, the only callstack is:
WpfApp119.ViewModel.Compute() Line 23 C#
WpfApp119.ViewModel.LoadData.AnonymousMethod__0_0() ...
0
votes
1
answer
31
views
Setting Up Java Exception Handling for My Program
I was trying to handle some exceptions in my code for the prime number detector I am working on. This is my current code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java....
0
votes
1
answer
39
views
How to implement a (derived) Exception type in Julia?
I'm trying to figure out how to implement a custom Exception type for a library which I am writing in Julia.
This is what I have come up with so far, mostly by following information I have found ...
0
votes
0
answers
29
views
Spring Boot Exception Handler not detecting Exceptions inside SAMLUserDetailsServiceImpl class
I'm having class that implements SAMLUserDetailsService and inside it there's some business logic of parsing user. Wherever exception is thrown inside that class I get Whitelable error page because my ...
-1
votes
0
answers
21
views
Spring Security with Spring Exception Handling
Thanks for your help.
I am currently working with Spring Boot and Spring Security. My issue is that a MethodArgumentNotValidException is thrown due to validation violations in the JSON of the request. ...
0
votes
0
answers
17
views
How to print inside a Xilinx Artix-7 Microblaze exception handler
I am working on a baremetal Microblaze and I want to print data when it crashes. I setup the exception handler and I know it's working since the breakpoint triggers inside this handler. However, I ...
0
votes
1
answer
37
views
A php mysqli exception is ignoring numerous catch blocks until the last one (which is outside any class) [duplicate]
I have a mysqli call ($result = $this->mysqli->query($query)) in which $query is an insert statement that generates the error: "Duplicate entry 'dt' for key 'username_UNIQUE'";. I ...
0
votes
1
answer
88
views
How display MediaPlayerElement from stream in WinUI 3 Net 8
I have Stream and I want create MediaPlayerElement of WinUI 3 from this stream.
this my code:
var mediaPlayer = new MediaPlayer() {
AutoPlay = x.AutoPlay,
Source = MediaSource....
0
votes
0
answers
52
views
ESP6288 program crashes at various points after reading struct data from progmem with pgm_read_ptr and strcpy_P
I am working on an Arduino code using an ESP8266, that is pretty big, so I try and put as much as I can in PROGMEM. Part of the data I am trying to put in PROGMEM, are strings that are related to each ...