Category "exception"

How to detect exceptions as errors in emacs *compilation* buffer?

I'm running (c++ / gtest / bazel) unit-tests within emacs (ver 26.3) with results displayed in the *compilation* buffer. I would like unexpected exceptions to b

Writing C++ without exceptions?

This answer mentions two ways to handle a C++ library (such as Qt) which is not exception safe: Isolate it in exception-safe wrappers Give up exceptions and ad

Exception from Jenkins during initialization

I am running a Jenkins server based on https://hub.docker.com/r/jenkins/jenkins LTS. While running version 2.332.1, I have noticed the following exceptions duri

python: argparse throwing value error when combining positional and optional argument

I'm trying to use the argparse library in python to read in optional and required arguments. So far I'm doing this: import argparse parser = argparse.ArgumentPa

Connection Java - MySQL : Public Key Retrieval is not allowed

I try to connect MySQL database with Java using connector 8.0.11. Everything seems to be OK, but I get this exception: Exception in thread "main" java.sql.SQL

Need to show "Insufficient Funds" for negative amounts

I need to throw an exception for "insufficient Funds" when a user withdrawals more than the amount in initialAccountBalance (which equals 500.00). However, I a

ORA-03150: end-of-file on communication channel for database link

In an Oracle database there's a big PL/SQL procedure being executed periodically that copies data from one DB to another one through a database link and it is f

How can I catch an exception and send it as json message?

I wrote a code but for some reason it doesn't work...can you tell me what's wrong? I want the app not to stop when I get an exception, only to send that excepti

Exception Handling Python TypeError: 'NoneType' object is not callable

I am scraping a list of urls with the same html format. Here is my scraper import requests, bs4, csv, json from pprint import pprint with open('playerslist.jso

Python raise NotADirectoryError

I'm trying to raise an error when a directory does not exist, before I open files in that directory. According to this response I should use the most specific E

Detecting out of memory errors

I would like to provide my system with a way of detecting whether out of memory exception has occurred or not. The aim for this exercise is to expose this flag

no mssql-jdbc_auth-8.2.1.x64 in java.library.path

I'm trying to connect to SQL DB in my Maven project, but keep getting following exception: "com.microsoft.sqlserver.jdbc.SQLServerException: This driver is no

Python detect string and int using exception handling

I am trying to work on detecting strings and int using exception handling and cannot figure it out. Please help! Using the inputs Lee 18 Lua 21 Mary Beth 19 Stu

On Error Resume Next in Python

Snippet 1 do_magic() # Throws exception, doesn't execute do_foo and do_bar do_foo() do_bar() Snippet 2 try: do_magic() # Doesn't throw exception, doesn'

True-way solution in Java: parse 2 numbers from 2 strings and then return their sum

Given the code: public static int sum(String a, String b) /* throws? WHAT? */ { int x = Integer.parseInt(a); // throws NumberFormatException int y = Integer

Tracking "hidden" exceptions

I am inspecting the output of a program of mine where from time to time I see a message like "java.lang.NullPointerException" and nothing else. Because this doe

Adding information to an exception?

I want to achieve something like this: def foo(): try: raise IOError('Stuff ') except: raise def bar(arg1): try: foo() exce

How do I solve SecurityNegotiationException and InvalidCredentialException in WCF

So I've written a small game and wish for the game to be playable over the internet. I've been testing the game just through localhost using these configs: Cl

org.hibernate.QueryParameterException: could not locate named parameter [userId]

I need help, I am getting the aforementioned exception. Where am I going wrong? In the mapping from class to table, I have used the following: private String u

Verifying ArgumentException and its message in Nunit , C#

In my test program in Nunit, I want to verify that it's getting the write Argument Exception by verifying the message. [Test] public void ArgumentsWork