Skip to main content

Questions tagged [exceptions]

An exception is an occurrence in an application process that requires deviation from the program's normal flow.

5 votes
5 answers
590 views

Imagine I have a function like this (written in Java): void sayHello(String firstName, String lastName) { if (firstName == null) { throw new IllegalArgumentException("first name is ...
J-bob's user avatar
  • 357
4 votes
2 answers
503 views

I am trying to write a backend for use with a completely text based UI for one shot operations (eg. python scriptname arg, executes that argument and exits) and a GUI using the curses library for some ...
Hugo Schongin's user avatar
1 vote
4 answers
547 views

In order to make sure methods fail fast under invalid arguments, I usually do validation at the start of a method. If I'm verifying multiple predicates, this leads to a few lines of checkNotNull or ...
EarthTurtle's user avatar
0 votes
2 answers
731 views

We manage a backend application behind a FastAPI REST controller with multiple endpoints. A member of our team decided to use a middleware on the application which parses the body of the response for ...
Blue_Elephant's user avatar
5 votes
6 answers
2k views

A long time ago I was in a class and the professor had us write individual exception handlers for every possible error. This seems almost impossible to do when developing large pieces of software ...
FourierFlux's user avatar
3 votes
1 answer
825 views

I have been tasked with the title above. There is currently zero exception handling. There are 100+ threads, all created from main(). Exceptions won't percolate up to main() - they won't leave the ...
Mawg's user avatar
  • 4,308
0 votes
1 answer
306 views

We have a GraphQL server which sends data to the front end client. We have other tenants who will use our sever and host their code. I want to create a system where they all can create any custom ...
user415612's user avatar
2 votes
1 answer
225 views

Given that there are no checked exceptions in Kotlin, are Result types the correct way to indicate an exception occurred to the caller? For example, I have the following function in my code: suspend ...
Adam's user avatar
  • 272

15 30 50 per page
1
2 3 4 5
43