Skip to main content
-5 votes
0 answers
44 views

How to rollback for specific error code when exception handler

I use @Transactional in service layer so it will roll back if a RuntimeException happens. My project have a class called BusinessException that extends RuntimeException. I will attach the error code (...
1 vote
0 answers
70 views

std::rethrow_exception with std::current_exception

Just fumbling around with exceptions for no further reason. In C++20, I noticed a behaviour around the std::rethrow_exception function when used with nested exceptions and std::current_exception. ...
0 votes
0 answers
3 views

codeceptjs 3 run-workers with 11 worker threads encounter session out or time out problem

Trying to upgrade my test from codeceptjs2 to codeceptjs3 and run lots of test files with run-worker command: npx codeceptjs run-workers 15 --plugins allure The command seems working very well and ...
0 votes
2 answers
11k views

Getting a connection timed out exception in webservices

I am getting the following exception when I try to submit a request through webservice. The stack trace is as below: Exception in thread "main" com.sun.xml.internal.ws.client....
3 votes
3 answers
3k views

Downloading images with selenium and requests: why does the .get_attribute() method of a WebElement returns a URL in base64?

I have written a webscraping program that goes to an online marketplace like www.tutti.ch, searches for a category key word, and then downloads all the resulting photos of the search result to a ...
6 votes
3 answers
5k views

Should I return a status code or throw an exception in .Net Web Api 2

I have seen examples like this public IHttpActionResult GetProduct(int id) { Product item = repository.Get(id); if (item == null) { throw new HttpResponseException(HttpStatusCode....
2 votes
1 answer
4k views

Issue with vlayout in ZK

I am new to ZK. I have craeted a zul file which includes the vlayout component. Here is the entire code: <?page title="My Chart"?> <zk xmlns="http://www.zkoss.org/2005/...
2 votes
1 answer
34 views

System.ArgumentNullException on new MutexAccessRule

I have a "single application instance" detection function, using the "classic" Mutex approach: var identity = new SecurityIdentifier(WellKnownSidType.WorldSid, null); var ...
0 votes
0 answers
20 views

Python: is there a straightforward way to determine if it is safe to move a line of code outside of a try-except? [duplicate]

Suppose you have some code like this: def some_func(): try: func_a() func_b() func_c() except SomeException as e: print("An exception occurred.") Is ...
0 votes
2 answers
46k views

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

import java.util.*; class stockbuysell{ //Function to find the days of buying and selling stock for max profit. public static void main(String []args){ int A[] = {100,180,260,310,40,...
5 votes
2 answers
3k views

Exception handling in StreamingResponseBody

I'm trying to catch an exception thrown in my implementation of StreamingResponseBody, I can see the exception being thrown inside the class however the thrown exception isn't visible to the method ...
4 votes
1 answer
9k views

Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start()

This is a screenshot with the error dump: I occassionaly get this error while browsing a website i am developing. Obviously session can't be started but i have no idea how to prevent this error ...
1 vote
0 answers
55 views

When is it better to use if statements versus multiple except blocks (or a mix of both) in Python? [closed]

I came across the following code while refactoring a Python program: if not Path(file_path).exists(): logging.error(f"File not found: {file_path}") return {} try: with ...
1 vote
1 answer
12k views

How to Solve org.springframework.beans.factory.BeanCreationNotAllowedException?

I am working on the project from a youtube tutorial and get stuck at this Exception.How to Solve org.springframework.beans.factory.BeanCreationNotAllowedException? I am working on the project from a ...
18 votes
3 answers
33k views

python how to re-raise an exception which is already caught?

import sys def worker(a): try: return 1 / a except ZeroDivisionError: return None def master(): res = worker(0) if not res: print(sys.exc_info()) raise ...

15 30 50 per page
1
2 3 4 5
3622