Most voted "exception" questions
The exception treatment is the mechanism responsible for the processing of occurrence of conditions that change the normal flow of code execution.
Learn more…329 questions
Sort by count of
-
0
votes1
answer47
viewsMultiple Bags Exception / Searching multiple collections with JPA
I’m having a problem with JPA when I make an appointment. I’d like to consult Entity A that has a List of Entity B and List of Entity C (I want to consult Entity A bringing the relationships with…
-
0
votes0
answers302
viewsHow to fix Activitynotfoundexception error?
I have two activities put in extremely different packages as shown in the codes below: Mainactivity package com.main.package; import ...; public class MainActivity extends Activity { @Override…
-
0
votes1
answer32
viewsjava.lang.Illegalmonitorstateexception
The method LeaveServer is in a class called ServerData, and serves to put an open server when the client so wishes. The method notifyall has been implemented in another class where contains all…
-
0
votes0
answers47
viewsClientexception
Hello I am taking the error Clientexception and do not know why, I am long trying to tidy up and I keep taking the same error to upload my files (I use Sentry) code below: That’s the first message…
-
0
votes0
answers81
viewsProblem importing a . net framework project into a . net core project
hello, I’m creating a . net core application but I need to use a . net framework project. i can import it without any error but at runtime an exception is fired. The Exception says that it was not…
-
0
votes1
answer797
viewsAttributeerror: 'module' Object has no attribute 'exceptions'
I’m trying to use the module requests with python but I’m having the following errors: File "/home/santana/string.py", line 35, in <module> except requests.exceptions.RequestException as e:…
-
0
votes1
answer331
viewsReturn messages through exceptions
Hello, I generated a doubt regarding the most "elegant" way for my method to display a message to the user. I’m using the following blade in order to return messages, but it does not return…
-
0
votes1
answer275
viewsHow to treat exceptions when deleting a primary key record referenced in another table in the Laravel framework
I’m having trouble deleting a record to which your primary key was referenced in another record from another table! The tables are discipline and teacher, where the primary key of teacher is being…
-
0
votes0
answers54
viewsWhy does it give this error when executing the code? java.lang.Arrayindexoutofboundsexception: 0
package PilhaEstatica; public class App { public static void main(String[] args) { int numero = Integer.parseInt(args[0]); Pilha p = new Pilha(); int…
-
0
votes1
answer104
views(JAVA) How to treat Exception with spring?
In my model I declared this code to be unique. @Column(unique=true, name = "codigo") private long codigo; At the time it is displayed in the api and I inform equal codes for two employees appears to…
-
0
votes1
answer25
views -
0
votes1
answer203
viewsException Treatment does not work when dividing by zero
I need to read a set of values and report the division between them, regardless of whether they are positive or negative. The problem says that if there is a division by zero a message should be…
-
0
votes1
answer41
viewsI can’t handle exceptions in the Controller on an ASP.NET API
In the code below I am trying to change the status of the request when I could not find the Project ID. // GET api/values/5 [HttpGet("{id}")] public Project Get(int id) { try { var project =…
-
0
votes0
answers58
viewsSpring Boot rollback in chain transactions
After validating all entities, I call a method to perform several operations in the bank, in which if one of them goes wrong, all the above must be undone. When arriving at the "throw new…
-
0
votes0
answers7
viewsTreating exceptions "Staleelementreferenceexception" from Selenium in Python
I am developing a web automation to insert a list of numbers in a field on a website platform and click recurring within a "for" loop n times according to the dimension of the list. At first the…
-
-1
votes1
answer133
viewsDoes Try Catch influence performance?
Utilise Try...Catch influence on performance? in memory usage? Would be a problem if all actions you do have error handling? try { clienteRepository.Salvar(entity); } catch (Exception e) {…
-
-1
votes2
answers548
viewsHow to generate error in logerror.txt file?
I am trying to generate errors in the file logerro.txt, but I don’t know how to do it. I used the syntax error function: try{ }else(PDOException $e){ echo'Sistema indisponível'; LogErros($e); I used…
-
-1
votes1
answer267
viewsException in removing the last element of Arraylist
My Problem: I have an Arraylist of an object that represents the number of lines in my Jtable, model class. well, all the other methods are working perfectly, the problem is the remove() I have no…
-
-1
votes1
answer666
viewsDifference between Error - Exception - Throwable within catch()
Always when I treated the catch I wore (Exception e) but a few days ago I came across an exception that did not fit the catch (Exception e) then I discovered that she is not really an exception but…
-
-1
votes1
answer64
viewsTrying to create my own Java checked exception
Guys, my question is this:: In the file method, I really need to do this Try-catch? In my mind I wouldn’t need to since I’m declaring the throws with my class…
-
-1
votes1
answer299
viewsPrevent database insertion with String " (with space in name)
My problem is this:: I have a Jtextfield that will receive the name of my entity, will pass to the controller, which will create the bean and finally, call the DAO to insert into the bank. Simple…
-
-1
votes2
answers156
viewsPHP: How to take exception from the model in the controller
I created a class to connect to LDAP, in one of the methods I did the following: // Classe Ldap() public function ldapConnection() { $this->_ldapCon = ldap_connect($this->_ldapServer); if…
-
-1
votes1
answer626
viewsTreat error when connecting to Mysql with PDO
People would like to treat the error that occurs if the Mysql server is not running, I want only one message to appear so I made the following code: function mensagemErro () { throw new…
-
-1
votes1
answer41
viewsExcept bugging without being called
well, I made a "minigame" with even a save/load system. the problem is that after saving or loading the game, ask to "mine", the script returns me the except command of the first command. guy: i…
-
-1
votes1
answer65
viewsError in assigning Try and Exception
We are having difficulty executing an activity of POO. To run the code block where the method we use displays an unexpected output (Semantic error). def acionamento(self, estado, nome_gerador): #…
-
-1
votes0
answers6
viewsError System.Net.Sockets.Exception: A Connection Attempt failed because the Connected party Did not properly Respond after a period
It’s Devs, all right? I need your help regarding an error I am taking when consuming the Endpoint of an API via Httpclient with Postasync() and Wait() methods from a Webservice hosted on another…
exceptionasked 3 years, 2 months ago BrunoDMota 1 -
-2
votes3
answers323
viewsHow to prevent a System.Nullreferenceexception within an if
I’m developing a web application where a photographer does upload of an image. After uploading the image, I will scan the entire Metadata in order to capture some information from directories (Exif,…
-
-2
votes1
answer48
viewsIllegalstateexception
Good afternoon, I have a simple web application (JSP / Servlets), which when starting on Tomcat 8.5.16, does not "run" and sends the following message on Catalina.out: INFO [Abandoned connection…
-
-3
votes1
answer650
viewsWhy does this method generate java.lang.Stackoverflowerror?
The following code generates this: java.lang.StackOverflowError at modelo.Secao.eleitores(Secao.java:67) And I don’t know why.…