Skip to content

Improved: Replace printStacktrace() with Debug.logXXX (OFBIZ-13214) #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -482,7 +482,6 @@ private static void initializeTransactionProcessor() {
tp = new TransactionProcessor();
} catch (InitializationException iex) {
Debug.logError("TransactionProcessor failed to initialize" + iex.getMessage(), MODULE);
iex.printStackTrace();
}
}

@@ -498,7 +497,6 @@ private static Map<String, Object> processCard(RequestIF request) {
processCardResult.put("processCardResponse", response);
} catch (TransactionException tex) {
Debug.logError("TransactionProcessor failed to initialize" + tex.getMessage(), MODULE);
tex.printStackTrace();
}
processCardResult.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);
return processCardResult;
Original file line number Diff line number Diff line change
@@ -4953,7 +4953,6 @@ public Map<String, Object> createDropShipGroups(LocalDispatcher dispatcher) thro
shipInfo.getFacilityId()).queryOne();
} catch (GenericEntityException e) {
Debug.logError("Error :" + e.getMessage(), MODULE);
e.printStackTrace();
}

String requirementMethodEnumId = storeRequirementMethodEnumId;
Original file line number Diff line number Diff line change
@@ -1261,7 +1261,7 @@ public static String convertDocumentToXmlString(Document document) {
String output = writer.getBuffer().toString();
return output;
} catch (TransformerException e) {
e.printStackTrace();
Debug.logError(e, MODULE);
}

return null;
Original file line number Diff line number Diff line change
@@ -727,7 +727,7 @@ private static Document getDocument(URL url) {
if (sxe.getException() != null) {
x = sxe.getException();
}
x.printStackTrace();
Debug.logError(x, MODULE);
} catch (ParserConfigurationException | IOException e) {
// Parser with specified options can't be built
Debug.logError(e, MODULE);
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ public ExampleRemoteClient() {
try {
rd = (RemoteDispatcher) Naming.lookup(RMI_URL);
} catch (NotBoundException | RemoteException | MalformedURLException e) {
e.printStackTrace();
Debug.logError(e, MODULE);
}
}

Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@
import javax.servlet.http.HttpSession;

import org.apache.ofbiz.base.util.UtilCodec.SimpleEncoder;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.UtilHttp;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.template.FreeMarkerWorker;
@@ -73,6 +74,8 @@

public class MacroFormRendererTest {

public static final String MODULE = MacroFormRendererTest.class.getName();

@Injectable
private HttpServletRequest request;

@@ -302,7 +305,7 @@ public void checkFieldMacroRendered(@Mocked ModelFormField.CheckField checkField
try {
macroFormRenderer.renderCheckField(writer, context, checkField);
} catch (IOException e) {
e.printStackTrace();
Debug.logError(e, MODULE);
}

assertAndGetMacroString("renderCheckField", ImmutableMap.of(
Loading