Local tools
This commit is contained in:
@ -25,6 +25,7 @@ import java.util.*;
|
||||
//import javax.servlet.ServletContext;
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import javax.servlet.http.Part;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ import com.zaxxer.hikari.HikariDataSource;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import org.ccalm.main.models.FrmLocustModel;
|
||||
import org.ccalm.main.utils.CustomException;
|
||||
import org.ccalm.main.utils.LTools;
|
||||
import org.json.JSONObject;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@ -2332,7 +2333,7 @@ public class AcceptJSON implements ServletContextAware {
|
||||
} catch (Exception e) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
logger.error(uuid,e);
|
||||
json = Tools.createJSONError(10000,"Internal_Server_Error", (String)null, uuid);
|
||||
json = LTools.createJSONError(10000,"Internal_Server_Error", (String)null, uuid);
|
||||
}
|
||||
return json.toString();
|
||||
}
|
||||
|
||||
@ -17,9 +17,9 @@ import java.util.Base64;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Tools {
|
||||
public class LTools {
|
||||
//---------------------------------------------------------------------------
|
||||
private static final Logger logger = LogManager.getLogger(Tools.class);
|
||||
private static final Logger logger = LogManager.getLogger(LTools.class);
|
||||
//---------------------------------------------------------------------------
|
||||
public static JSONObject createJSONError(int code, String message, String setting, String marker) {
|
||||
JSONObject json = new JSONObject();
|
||||
@ -162,6 +162,4 @@ public class Tools {
|
||||
}
|
||||
return payload;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user