From e0d92c6f198dfb8717b0c788644325ed7a5c3563 Mon Sep 17 00:00:00 2001 From: fabio Date: Wed, 18 Aug 2021 13:33:50 +0000 Subject: [PATCH] fixes bug#22868 dev: Celio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@108370 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../rjconsultores/ventaboletos/rest/IntegracaoSapRest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/rest/IntegracaoSapRest.java b/src/com/rjconsultores/ventaboletos/rest/IntegracaoSapRest.java index b98aad358..8722553f0 100644 --- a/src/com/rjconsultores/ventaboletos/rest/IntegracaoSapRest.java +++ b/src/com/rjconsultores/ventaboletos/rest/IntegracaoSapRest.java @@ -1,6 +1,5 @@ package com.rjconsultores.ventaboletos.rest; -import java.io.IOException; import org.apache.commons.codec.binary.Base64; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; @@ -12,7 +11,6 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.util.EntityUtils; import org.apache.log4j.Logger; -import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import com.rjconsultores.ventaboletos.enums.TipoEnvioRest; @@ -39,7 +37,7 @@ public class IntegracaoSapRest { if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK && response.getStatusLine().getStatusCode() != HttpStatus.SC_CREATED) { - throw new IllegalStateException("Ocorreu um erro na requisição." + response.getStatusLine() !=null ? response.getStatusLine().getReasonPhrase() : ""); + throw new Exception("Ocorreu um erro na requisição." + response.getStatusLine() !=null ? response.getStatusLine().getReasonPhrase() : ""); } return getRetornoJSON(response);