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
-
1
votes0
answers106
viewsException java.util.Concurrent.Rejectedexecutionexception:
Good afternoon, I’m back from a JEE project where I used jms and the server is wildfly 8.0. I’ve been working on this exception for a while, but I haven’t been able to figure it out yet. I don’t…
-
1
votes2
answers191
viewsError Log Generation Aspects by XML
I have an application developed in C# that uses an SQL Server database, this application is made available through a virtualized application server, I do not have direct access to the database nor…
-
1
votes2
answers201
viewsJSF Converter Generating Exception
Not to escape the scope of the previous question: Product displayed is the smallest within the group (Criteria) The problem apparently of the issue has been solved, although it was not possible to…
-
1
votes0
answers176
viewsCommunication failure with Communications link Failure database
I have a database that is in the cloud, because it’s from a site that I and some colleagues are creating and I needed to connect it to Netbeans, I put the host, the name of the database, user and…
-
1
votes2
answers80
viewsError trying to define or read the value of variables already defined - System.Nullreferenceexception
I’m having trouble with this code. Whenever it rotates, it causes an exception of the type System.NullReferenceException. // Clear out the Array of code words wordBuffer = null; Int32 syntaxCount =…
-
1
votes3
answers109
viewsHow to display the excerpt from the script where the exception was released in PHP
PHP, when an exception is released, is informed the file and the line where the exception was launched. Example: try { throw new Exception('Só para mostrar a linha'); } catch (Exception $e) { echo…
-
1
votes1
answer229
views -
1
votes1
answer477
viewsPROCV - How to avoid the window to select external spreadsheet when non-existent
I have a planilha using access to lookup of other planilhas PROCV, but they are floating formulas, that is, they change according to the input in specific fields. This change occurs through Macro,…
-
1
votes0
answers138
viewsError of Session in Java
I have the following methods : public void delete(Class c, int id) throws SQLException { Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); try{ Object ob =…
-
1
votes0
answers84
viewsException interception for logging, using AOP with CDI in Java EE 7
Below I have part of a class, of which I want to eliminate repetitive logging code through AOP. /** * Javadoc omitido */ public abstract class JpaDao<T extends LongIdentifiable> implements…
-
1
votes1
answer149
viewsHow can I test an Exception in my code with unittest?
I am studying a little of Python’s unittest and I have stopped there. In my code the user must enter a valid value, if an invalid value occurs should fall in Exception, however how can I test it ?…
-
1
votes1
answer1103
viewsWhat is the difference between Error and Exception?
Why we have Exceptions (IOException, for example) and Errors (OutOfMemoryError, for example)? I know you both inherit from the class Throwable, but what’s the difference between them?…
-
1
votes2
answers86
viewsCapture list item by index
I have the code: for(int i = 0; i < 99999; i++) { minhaLista.get(i + x); //x é int e possui um valor qualquer } At some point the sum of i + x results in a value greater than the list size. If…
-
1
votes2
answers1841
viewsHow to treat division by 0
I have the code where there can be a division by zero: Binding binding = new Binding(); GroovyShell shell = new GroovyShell(binding); conta = shell.evaluate(conta).toString();…
-
1
votes2
answers763
viewsWhat is the best way to read a sql server error return?
How best to read an error return from sql server in a C# web form application? I got the following.. No sql server; END TRY BEGIN CATCH Raiserror('Erro ao gerar os dados', 18, 1); return; END CATCH;…
-
1
votes1
answer152
viewsReturn method with throw
This method has the type of return Connection, however in the blocks catch there is no return conn and still there is no compilation or execution error. I believe it is by throws and throw but I…
-
1
votes2
answers110
viewsBlock using and Exceptions
Is there any way to report code errors in the block using as in the try we have the catch? Or using the using I’m stuck with a plethora of if, else if and else? Supposing that the block using force…
-
1
votes1
answer4911
viewsEoferror type exception treatment
while True: try: x = input().split() l.append(x) except EOFError: break I’m having a problem with this code where I’m not getting an EOF from x, because if I don’t type anything and just hit enter,…
-
1
votes1
answer245
viewsWhat are the impacts of excessive use of Try/Except (Exception Treatment)?
I create a lot of programs with a graphical interface and a lot of user interaction. I always exaggerate on try/except. What are the impacts of excessive use?
-
1
votes1
answer734
viewsSpring, Angular JS and Exception Handling in Service Layer
I have an app that uses Jasper-Reports version 6.2.0 with spring-mvc version 3.2.14, java-ee-7, Tomcat 8 and at front-end we use Angularjs. The requisitions Rest are made via ajax. The application…
-
1
votes0
answers236
viewsProblem with sockets when closing client: java.net.Socketexception
Hello, good morning, good afternoon or good evening, I’m having a problem, with a system I’m creating, I thank anyone who can help. Then, this system basically passes a "protocol" to the server and…
-
1
votes1
answer308
viewsTreat exception in an Asynctask
I use a Asynctask in the app that works blz, however if the Webservice is out of the air, it returns that the application has stopped, I have tried to treat the exception in several ways but it does…
-
1
votes1
answer985
viewsExternal exception C0000006
This week I’m hitting myself on this mistake on some machines where the system is running. Excepção externa C0000006 EXCEPTION_IN_PAGE_ERROR The machines have access to the system through a shared…
-
1
votes1
answer1299
viewsUncaught Exception 'Exception' PHP
Colleagues. I’ve adjusted the code. The solution was based on colleagues putting the new Exception() throw inside the Try/catch block and also put out the if() conditional. See: function…
-
1
votes1
answer1757
viewsException Error "' ', hexadecimal value 0x1F, is an invalid Character. Line 1, position 1"
I have an app made on C# to show the menu of my university’s university restaurant, which picks up the information through a XML. The app allows individual consultation of each meal (breakfast,…
-
1
votes0
answers16
viewsHow to export sqlite and python exceptions log using Import Error
I am using Python and giving import of sqlite3 library and sqlite3 giving import in Error for exception handling! import sqlite3 from sqlite3 import Error def errorlog(erro): errlog =…
-
1
votes1
answer1335
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method
My program gave this problem when I tried to create a stack (database), to store strings on my Android app package com.project.meuapp2; import android.content.Intent; import…
-
1
votes1
answer39
viewsProblem with controlling connections with the Bank
I am having some problems connecting to the database. Follow my code and the exception. Code @Repository public class MinhaClasseDAOImpl implements MinhaClasseDAO{ protected EntityManagerFactory…
-
1
votes2
answers126
viewsRelease of exceptions as a function of prime number
Write a function that receives a number, throw an exception if the number is not positive and return true if it is prime, or false, otherwise. My answer: public static void main(String []args)…
-
1
votes0
answers287
viewsConversion error in Restsharp Deserialize method
I have a method that consumes a Rest and then deserializes using a class. It was working, but maybe by changing the return made appear the error. My method is like this: public void LoadPedidos() {…
-
1
votes1
answer345
viewsError (Connected String) Asp . Net MVC - Visual Studio 2013 and SQL Server 2012
I have a problem with my MVC Asp.Net. I created the Connection String inside Webconfig, <connectionStrings> <add name="connSql" providerName="System.Data.SqlClient" connectionString="Data…
asp.net-mvc web-application exception visual-studio-2013 connectionstringasked 8 years ago Marcelo Medeiros dos Santos 73 -
1
votes1
answer77
viewsProcessing 3.2.1, Game Control Plus library, java Exception
Good! I am studying Games & Apps Development and in our first semester we are doing a game in Processing. In my game I’m using a PS4 controller with the help of the library Game Control Plus. If…
-
1
votes1
answer82
views -
1
votes1
answer513
viewsException handling (Try) error in python
I am making a program that makes numerical calculations, but constantly appear to me operations where there is division by 0 (zero). I ended up finding a solution using if, but still wanted to know…
-
1
votes0
answers24
viewsJsfExceptionHandler ConstraintViolationImp messageTemplate
I have the mapping in the user class: @NotNull(message = "Contato não pode ser vázio.") @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "contact_id") @Getter…
-
1
votes2
answers74
viewsSkip file when entering an Exception
Good afternoon Below is a method I use to read certain files from a folder. The problem is as follows. If the folder has 50 files (or 60, or 70, or 80 ...) and the method is reading a "faulty" file…
-
1
votes1
answer62
viewsException in file . py
I have the following code: import socket from xml.etree import ElementTree as et import math, urllib import random, time, re global String_1, String_2, String_3, String_4, Chat, Using_Proxies,…
-
1
votes2
answers335
viewsHow to validate a wrong typed data?
Since I could create an exception in case the user enters an invalid option, drop in exception, an error message appears and displays the menu again for the user. I created a flag starting with…
-
1
votes1
answer129
viewsHow to handle a rendering Exception in WPF (Windows Presentation Framework)
Randomly my system causes this Exception (which I only see because of the logs left in Windows events). It’s an app that runs around 24 hours a day every day. When error occurs, the screen freezes…
-
1
votes1
answer125
viewsReturn of the clean catch code
I am reading the book Clean Code of the series of Robert C. Martin. And it was presented a very common situation in my day to day. public static void main(String[] args) { String nome = null; try {…
-
1
votes1
answer82
viewsHow to treat an index band exception?
I’m having an exception problem on my show and I’m not sure how to treat it. Follow the error image in Datagridview. private void DGW_solictacao_CellClick(object sender, DataGridViewCellEventArgs e)…
-
1
votes2
answers220
viewsWhat is the best way to treat Exceptions and Log in Webapi (C#)?
Setting: Webapis in . NET 4.x Goal: Improve Logging (info, error, debug, Warning) and Exception Handling, for example, log in exceptions, which Log frameworks do you use? Where do you store Logs? I…
-
1
votes2
answers1138
viewsHow to use Try and catch with PHP?
I have a question about how to apply the try and catch in a method. public function cadastrarUsuarios(parametros){ mysqli_query($this->conexao,"INSERT...."); // Aqui que vem a dúvida try{…
-
1
votes1
answer68
viewsKeep stack trace when the method gives rethrow in the captured Exception
I ran the Visual Studio Code Analysis application and in several methods received the following message: CA2200 Rethrow to preserve stack Details 'fooBLO.Foomethod(Dadosprojectdto, string)' rethrows…
-
1
votes1
answer145
viewsAm I throwing correctly?
I’m doing like a Firebase DAO that performs and handles Auth, Database and Storage. But Firebase emits some exceptions depending on the scenario, password with less than 6 digits, email already…
-
1
votes1
answer99
viewsHow to capture exceptions released by the Insert() method?
I am using Sqlite for a local bank in an Android application, my problem is that I am unable to handle the integrity restriction exceptions. I have a table where the two fields are PK, that is,…
-
1
votes1
answer527
viewsHow to obtain hierarchy structure of a Delphi component?
Guys I’m trying to refine my bug log and I came up with an idea. Using a component ApplicationEvents I have a routine that records the error log, in it I get the error in E.Message, and the Sender…
-
1
votes1
answer206
viewsHow to select a text that does not have a certain term in the middle?
I am trying to select a part of an HTML code with Regex but I am not able to do the correct regular expression, someone could give a help? I need to select the groups of <li> separately, i.e.,…
-
1
votes1
answer32
viewsNullreferenceexception in C#
I’m having a problem in C#, I’m facing an exception and I can’t recognize why Details of the Exception: System.Nullreferenceexception: "Object reference not defined for an instance of an object."…
-
1
votes1
answer1238
viewsJPA error with Mysql 8
Hello, After updating my database, my application has been presenting exceptions, like java.sql.Sqlsyntaxerrorexception. The class below is the one he complains about, saying it doesn’t exist when…