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
Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Crashlytics | android.view.WindowManager$BadTokenException

there. I want to ask about BadTokenException. android.view.WindowManager$BadTokenException - Unable to add window -- token null is not valid; is your activity running? android.view.ViewRootImpl....
DevJeong's user avatar
0 votes
0 answers
23 views

c# unexpected behaviour of Aes decryption

The problem: I have implemented some functionality that does decryption at specific events, but SOMETIMES it throws unexpected and unexplained exceptions. Flow: A master key/iv is fetched then data (...
Damian's user avatar
  • 131
1 vote
0 answers
13 views

Printing an exception that works on Micropython/CircuitPython AND desktop python

I am writing a library that is supposed to work on Micropython/CircuitPython as well as on "normal" Python (i.e, like a Raspberry Pi). I have not been able to find a way to format or print ...
somebody0's user avatar
0 votes
0 answers
14 views

HTMLAgility Pack HtmlWeb "Cannot access a disposed object" Issue

VB.Net Project using visual Studio Microsoft Visual Studio Community 2022 (64-bit) - Current HTMLAgility Pack When I try to load a web page via the HtmlWeb Load method, I receive this error: Cannot ...
Problem Alligator's user avatar
0 votes
0 answers
32 views

Refused connection in SQL Server

Here is my connecting function: public void connect(){ String url = "jdbc:sqlserver://localhost:1433;databaseName=qlsv"; String user = "sa"; String password ...
Mai C Tam's user avatar
-1 votes
0 answers
16 views

Visual Basic Exception when launching program [duplicate]

I use a tool called SamacSys LibraryLoader to manage symbols and footprints for electronic components for electronic schematic design. LibraryLoader has been working fine, but has started to throw an ...
mjuels's user avatar
  • 11
-3 votes
0 answers
47 views

Why is this giving me an IllegalMonitorStateException when all I'm doing is locking and then awaiting a condition?

For context, this is a blackjack game so dealer, player, handvalue and other terms are coming from that. obLock is a ReentrantLock and dealerDone is a Condition on that lock. In the past, I have done ...
Karbn's user avatar
  • 1
1 vote
2 answers
56 views

How do I reduce repetitive error handling in java

So I have a code snippet similar to this. I feel like the if statements should be in a common function. I am not sure how to handle that because school and student should be passed to this function ...
bob's user avatar
  • 31
0 votes
0 answers
24 views

Return BadCredentials Exception as Json - Spring Boot 3.2 [duplicate]

I have a Spring Boot service that uses Spring Security for authentication. I am checking the credentials in a custom AuthenticationProvider like this: @Component class CustomAuthenticationProvider(...
Cristi's user avatar
  • 700
0 votes
1 answer
24 views

Issues with 'range' in Google Apps script

Am trying to modify this script to copy entire rows with the word 'name' in a column to a new sheet. Got 'Exception: The number of rows in the range must be at least 1' so currently not working at all!...
debaron's user avatar
0 votes
0 answers
56 views

Is there a way to make certain, that the contents of a function labeled noexcept are not potentially throwing?

I would like a method to make certain, that any function labeled noexcept is only performing operations which are also noexcept. I don't want to generate code calling std::terminate() nor do I want to ...
Frank Puck's user avatar
0 votes
0 answers
12 views

When trying to verify a cert to link to Betfair API I am receiving an Exception (shown in text body) I can't understand why it would be showing this?

My code and the exception are as follows - # Import libraries import betfairlightweight from betfairlightweight import APIClient import os # Print the current working directory print("...
Chris Dye's user avatar
0 votes
0 answers
20 views

How to fix this error: slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

This is one of the functions in the code that I am using to study the trajectory of ships. I literally ran this code yesterday and this never happened. Overnight (without seemingly changing anything) ...
AfonsoVaz's user avatar
0 votes
0 answers
46 views

How can I find the real exception class to handle it?

I am developing Rest API. When I am getting exception, I want to handle it with its special exception class. I can understand what the exception class is returned when I run one code block from the ...
GreenEngineer's user avatar
-1 votes
1 answer
52 views

Is exception handling mandatory in MDC.remove() or MDC.put()?

import org.slf4j.MDC; MDC.put(ID1, id1); MDC.put(ID2, id2); MDC.put(ID3, id3); try { return joinPoint.proceed(); } finally { MDC....
239010391's user avatar
0 votes
1 answer
34 views

Rest Controller not returning correct reponse when using custom exception

Below is the service class and controller class for the spring boot application @Autowired private RecordRepository recordRepository; public void insertRecord(String dest, Integer num) { try { ...
Axel Blaze's user avatar
0 votes
0 answers
30 views

LocalProtocolError, the error specifically mentions an "Illegal header value" related to the Bearer token

The error you encountered is a LocalProtocolError. This error typically indicates an issue with the HTTP protocol, such as an illegal header value or a violation of the HTTP specification. In my case, ...
Abhay R. Kamath's user avatar
0 votes
0 answers
21 views

Exceptions handler is not working in Webflux

Hi I am new using web flux (Mono and Flux) and I am trying to create a controller that consume a service using webflux to bring a list in Cassandra, but I would like to throw a personalized exception ...
Michael Torres Ospina's user avatar
-3 votes
0 answers
18 views

solusi alternatif ketika terjadi eror seperti ini [closed]

Error: Could not find or load main class pbo.program_kasir.Program_Kasir Caused by: java.lang.ClassNotFoundException: pbo.program_kasir.Program_Kasir Command execution failed. org.apache.commons.exec....
Asep Shnda's user avatar
-1 votes
1 answer
20 views

org.eclipse.scout.rt.platform.exception.PlatformException: Failed to lease connection

I have the problem that I cannot connect to my MSSQL server with my Eclipse Scout project (version 23.2.15). The problem is that the server uses TLS10 and the client expects TLS13 or TLS12. Here is ...
FelixFeuerdorn's user avatar
-1 votes
1 answer
73 views

Why does the second catch block get omitted? (Java SE 8 OCA - Exceptions)

So I was trying to solve this sample question for the OCA Java SE 8 exam, but I got it wrong. public static void main(String... a) { System.out.print("a"); try { System.out....
Rty Euzch's user avatar
0 votes
1 answer
21 views

Problem executing a JavaFX by double-clicking

I'm developing a program with JavaFX. I made an .exe with launch4j and when I double-click it, it shows a window saying "A Java Exception ocurred". But if I via cmd type java -jar app.exe it ...
Geriberto's user avatar
1 vote
0 answers
19 views

Exception Handling in springboot using @ExceptionHandler in the same class where the exception is thrown [closed]

The task I'm assigned is whenever a custom exception is thrown, I have to handle it such that it doesn't appear in the logs, and I'm expected to send a Json response to the Ui with status code. I was ...
Änãnd Prãbhü's user avatar
0 votes
1 answer
21 views

springboot, spring boot jpa,class not found exception, Endpointer

**BlogController: ** package com.taskproject.blogproject.controller; import com.taskproject.blogproject.entities.Blog; import com.taskproject.blogproject.repositories.BlogRepository; import org....
amin's user avatar
  • 1
0 votes
0 answers
20 views

Troubling with Glassfish [closed]

I try to configure Glassfish application server but it end up like this: And I try to install the newest version of JDK (21.0.1) and Glassfish (7.0.12) Hope anyone can fix this . I need to set ...
Đức Chính's user avatar
-1 votes
0 answers
20 views

ExceptionHandler fails to handle exceptions in AuthenticationManager

I'm building a rest api server with spring boot and I'm using jdbcTemplate as API key validation for requests. Next is the implementation class that inherited the Authentication Manager that I defined....
seung hyun Cheon's user avatar
0 votes
0 answers
40 views

Exception not handled as expected in python

I have the following exception handling code: try: jobs1 = await data.get_jobs() jobs2 = await user.get_jobs() tasks = [asyncio.create_task(x) for x in [loop()] + jobs1 + jobs2] print(...
em1971's user avatar
  • 133
1 vote
1 answer
33 views

Polly final action after max retry

The C# project that I'm working on uses Polly (v8.3) for resiliency. The code looks very much similar to the sample found in the Github documentation : ResiliencePipeline pipeline = new ...
SimonAx's user avatar
  • 1,238
0 votes
1 answer
29 views

precedence of python exception raised from within finally block

I have some (python 3.12) code which really belongs in a finally block, but unfortunately that code can (in rare cases) raise an exception. Are exceptions raised in finally blocks guaranteed to take ...
nonagon's user avatar
  • 3,371
0 votes
0 answers
39 views

Error: The process was terminated due to an internal error in the .NET Runtime at IP 733270F0 (731A0000) with exit code 80131506

A Windows mixed-mode application terminates with a message box: (Exception Processing Message 0xc0000005 - Unexpected parameters) enter image description here There is an entry in the event log: ...
RobYxi's user avatar
  • 11
0 votes
0 answers
32 views

pyautocad COMError: (-2147352567, 'Exception occured.', (None, None, None, 0, None))

I tried to use pyautocad library to draw a simple circle on an open Autocad file by the code below. import pyautocad # Create an instance of AutoCAD acad = pyautocad.Autocad() # Define the center ...
burak ateş's user avatar
0 votes
0 answers
13 views

karaf : software.amazon.awssdk.core.exception.SdkClientException: Unable to load an HTTP implementation from any provider in the chain

I am using karaf and maven in my application. I am doing successful aws sso login by running command "aws sso login --profile <PROFILE_NAME> before running my application. then running ...
John's user avatar
  • 1
1 vote
1 answer
35 views

how to raise custom exception inside function checking for empty pd dataframe? [closed]

function check_dataframe raises custom class exception if pd dataframe is empty. is there way to put the 'try raise' inside the function itself? import pandas as pd class EmptyDataFrameError(...
ERJAN's user avatar
  • 24.1k
0 votes
1 answer
15 views

Send Custom Error Response for HTTP default status codes

My Requirement is to override the response returned by the HTTP for Status codes like 404, 503 etc. I had my fair share for searching about to override and send a custom error response for HTTP Status ...
Achutha K's user avatar
0 votes
1 answer
26 views

Handling exceptions and other conditions in decorators

def test_a(): try: # If everything is working well return {'status': True, 'message': 'This is a problem'} except Exception as e: return {'status': False, 'message': f'...
Abhishek's user avatar
0 votes
1 answer
45 views

Deadlock in Python garbage collection on exception

I have encountered a strange situation where a program won't exit due to the way python handles exceptions. In this situation, I have an object which owns a Thread, and this Thread is only shut down ...
xpilot's user avatar
  • 999
0 votes
0 answers
20 views

iText 7: ClipperException - "Coordinate outside allowed range" in text extraction from specific region

I'm encountering a file-specific issue with iText 7 while attempting to extract text from a particular region on a PDF page. The exception message is Coordinate outside allowed range. at iText....
Luis's user avatar
  • 5
-1 votes
2 answers
80 views

'System.InvalidOperationException' in System.Linq.dll (Sequence contains no elements)

Getting the following exception in the code below and cannot figure out how to solve for it: Exception thrown: 'System.InvalidOperationException' in System.Linq.dll Sequence contains no elements ...
Zemprof's user avatar
  • 255
-2 votes
0 answers
79 views

Why does libstdc++ often use base classes for STL containers [duplicate]

I noticed that libstdc++ often uses a base class for the implementation of standard allocator-aware containers. Especially, some basic functionalities are implemented in a base class that is inherited ...
LoS's user avatar
  • 760
-2 votes
2 answers
87 views

Why do I keep getting Microsoft C++ exception: std::out_of_range at memory location 0x000000B70C8FF360. when using vector?

Visual studio shows 0 issues found but when program starts, a tab pop up with vector library and points on line 2151 and says Unhandled exception at 0x00007FF90121CF19 in Project2.exe: Microsoft C++ ...
Gleb Bespalov's user avatar
0 votes
0 answers
11 views

How to throw ParseUUIDPipe exception when write UT with jest

I use NestJS GraphQL and use ParseUUIDPipe to validate UUID from args. My resolver looks like: async updateImage( @Args( 'companyId', new ParseUUIDPipe({ version: '4', ...
BaoTrung Tran's user avatar
-2 votes
1 answer
39 views

Why do Exception classes that extend the base Java Exception class not get caught?

Given the following program: public class App { public static void main(String[] args) throws Exception { int x = 0; try { throw new Exception2(); } ...
KodyN's user avatar
  • 9
0 votes
0 answers
9 views

How to use multiselect in streamlit to persist records

I have an excel database and two fields one screen. One is filters which is multiselect and has options like color and type. And the other is model which shows the records from database depending upon ...
Anonymous's user avatar
0 votes
0 answers
11 views

Facing the below exception System.ApplicationException:'Exception with an error code:0xa (SPXERR_INVALID_HEADER)' when detecting the language of audio

using speechrecognizer i was trying to fetch the language of the speech by following the code snippet using System; using System.IO; using System.Threading.Tasks; using Microsoft.CognitiveServices....
bhogi supriya's user avatar
0 votes
2 answers
48 views

PHP try catch inside a function not working. Why?

I try to catch exception inside a function, but it is not working. function dbquery ($mysqli, $query){ try { $result = mysqli_query ($mysqli, $query); } catch (Exception $e) { echo "...
Vladek's user avatar
  • 1
0 votes
0 answers
185 views

@ExceptionHandler annotated method in ControllerAdvice class is not invoked when exceptions are thrown

I have a problem, as the title suggests my method annotated with @ExceptionHandler is not invoked when exceptions are thrown. I've tried using as an argument of @ExceptionHandler(...) annotation both ...
Ign's user avatar
  • 81
0 votes
1 answer
65 views

Java uncatchable ClassNotFoundException when using java.awt.Clipboard

I get the following exception when running this code private static String getClipboard() { try { return (String) Toolkit.getDefaultToolkit().getSystemClipboard().getData(...
Dari_OS's user avatar
0 votes
2 answers
122 views

Failed to create instance of type 'Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider'

I cloned an ASP.NET Core project based on .NET 8. The IDE is VisualStudio 22 17.9, it compiles fine. But I got an error when I open the swagger page after startup, and the program doesn't end up ...
user23496668's user avatar
-1 votes
0 answers
15 views

getting error when I try to modify FLS of a field

Exception is thrown as below configuration Error: Invalid RecordId passed: "SourceContext". RecordIds must be 15 or 18 character strings. Create a local org . Set necessary licenses through ...
Prameela Bhat's user avatar
0 votes
0 answers
24 views

do_page_fault issue after system boot up for a while

Our embedded system is based on some rockchip platform, while booting up, the system crashes and dump below continuesly. [ 21.842194] Exception stack(0xb0d01ef0 to 0xb0d01f38) [ 21.842642] 1ee0: ...
leowinchester's user avatar

1
2 3 4 5
1074