本文整理了Java中net.sf.json.JSONException.printStackTrace()
方法的一些代码示例,展示了JSONException.printStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONException.printStackTrace()
方法的具体详情如下:
包路径:net.sf.json.JSONException
类名称:JSONException
方法名:printStackTrace
暂无
代码示例来源:origin: jenkinsci/performance-plugin
} catch (JSONException e) {
listErrors.add(1);
e.printStackTrace();
e.printStackTrace();
代码示例来源:origin: hudson/hudson-2.x
/**
* Accepts submission from the configuration page.
*/
public synchronized void doConfigSubmit(StaplerRequest req,
StaplerResponse rsp) throws IOException, ServletException, FormException {
checkPermission(CONFIGURE);
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
save();
String newName = req.getParameter("name");
if (newName != null && !newName.equals(name)) {
// check this error early to avoid HTTP response splitting.
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
} catch (JSONException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Failed to parse form data. Please report this problem as a bug");
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
rsp.setStatus(SC_BAD_REQUEST);
sendError(sw.toString(), req, rsp, true);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Accepts submission from the configuration page.
*/
public synchronized void doConfigSubmit(StaplerRequest req,
StaplerResponse rsp) throws IOException, ServletException, FormException {
checkPermission(CONFIGURE);
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
save();
String newName = req.getParameter("name");
if (newName != null && !newName.equals(name)) {
// check this error early to avoid HTTP response splitting.
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
} catch (JSONException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Failed to parse form data. Please report this problem as a bug");
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
rsp.setStatus(SC_BAD_REQUEST);
sendError(sw.toString(), req, rsp, true);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Accepts submission from the configuration page.
*/
public synchronized void doConfigSubmit(StaplerRequest req,
StaplerResponse rsp) throws IOException, ServletException, FormException {
checkPermission(CONFIGURE);
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
save();
String newName = req.getParameter("name");
if (newName != null && !newName.equals(name)) {
// check this error early to avoid HTTP response splitting.
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
} catch (JSONException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Failed to parse form data. Please report this problem as a bug");
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
rsp.setStatus(SC_BAD_REQUEST);
sendError(sw.toString(), req, rsp, true);
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
e.printStackTrace(pw);
代码示例来源:origin: mbreese/couchdb4j
e.printStackTrace();
代码示例来源:origin: i-m-c/jenkins-inheritance-plugin
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
代码示例来源:origin: hudson.plugins/project-inheritance
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
内容来源于网络,如有侵权,请联系作者删除!