Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

Questions tagged [exception-handling]

Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution.

0
votes
1answer
10 views

Exception filter for the class many different methods

In my client application that uses webApi I have a plethora of methods that make calls to webApi asynchronously like this:var task=Task.Run(async ()=> await this.SaveObject(User)); return ...
0
votes
0answers
15 views

Custom exception class properly handling exception

In a guessing game I made, my code is required to have two custom exception classes (BadGuessException and TooManyGuessesException) with two constructors each. The guessing game is also required to ...
1
vote
1answer
8 views

Uncaught Exception with async constructor pattern

This class is somewhat special as it uses lots of async calls insdie the constructor, and constructors cannot be async, so I used a special pattern that I read about in the internet: export class ...
1
vote
1answer
50 views

Implementing try-catch block with throw statements

In a guessing game I have to make, I need to include a try-catch block with two catch clauses (one multi catch block for my two custom exceptions: BadGuessException and TooManyGuessesException, and ...
0
votes
0answers
12 views

Android vitals and exception handling

I have been writing a simple Android application (one Activity).I would really like to gather crash reports from actual user sessions. I know there are some nice 3rd-party libraries. I also read ...
1
vote
2answers
43 views

How to implement custom exceptions for guessing game

I have to create a guessing game that allows for up to 5 turns and the user input must be between 1 & 10 inclusive. If these criteria aren't met, then two custom exceptions may be thrown (...
2
votes
3answers
32 views

How to use try except in case of a dictionary with multiple values?

I am using parallel processing to generate a dictionary as the following:def transform(x):result={'name': x.name, 'result_cap1': NLTK.parser(cap1), 'result_cap2': NLTK.parser(...
1
vote
1answer
33 views

JSON Exception deserializing into the proper type

I need to be able to deserialize in a correct type, and throw a random exception(type can be different) that comes as JSON from webApi. I tried doing it this way, but it comes up with error "type ...
0
votes
1answer
41 views

Class with generics for unknown exception type in c#

In my applications Web API, I have an exception filter that suppose to catch any exception and transmit it to the client within a response wrapper class.My goal is to make that exception transmit ...
1
vote
0answers
39 views

Catching Exceptions on initialisation of DbContext

I've been attempting to catch exceptions being generated when a table is doesn't match its' counterpart entity but can't for the life of me work out where I need to be doing the exception handling....
0
votes
0answers
42 views

CS1525: Invalid expression term '=' [on hold]

I was add a controller, that is AddQuestionController and create a view of that controller and write some code in controller and view. i don't know why this error is generated. can anyone please tell ...
0
votes
0answers
9 views

FATAL EXCEPTION: ControllerMessenger

can someone help me to fix these errors. I added my app to the firebase and did test run. and I got these errors. I am new to android app development. I have no clear idea where should I start to fix ...
4
votes
2answers
99 views

How to intercept a RequestRejectedException in Spring?

I am seeing a ton of RequestRejectedException entries in my Tomcat log (sample pasted below). These started appearing in my log file after a minor version upgrade (Spring Security 4.2.4, IIRC) a few ...
0
votes
0answers
38 views

What is CPU_DABORT_HANDLER used for in glue-df.h?

In the Linux kernel there is this file that is part of the ARM data abort exception handling code that undefines CPU_DABORT_HANDLER, then checks to see if it is defined further down.https://github....
0
votes
0answers
23 views

How to throw a checked exception within CompletableFuture?

I used a static method supplyAsync() to get a CompletableFuture, and call its whenComplete() method to deal with the result and exception.whenComplete() accepts a BiConsumer as parameter, and ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,