Class OA2ServletUtils
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.servlet.OA2ServletUtils
-
public class OA2ServletUtils extends Object
Utilities for various servlets. These handle the exceptions from the script runtime engine and perform a full rollback. These are messy, but unavoidable.Created by Jeff Gaynor
on 4/26/22 at 6:52 AM
-
-
Field Summary
Fields Modifier and Type Field Description static int
stackTraceMaxLines
-
Constructor Summary
Constructors Constructor Description OA2ServletUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
handleScriptEngineException(Object callingObject, OA2SE oa2SE, Throwable t, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger, OA2ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap tBackup)
static void
handleScriptEngineException(Object callingObject, OA2SE oa2SE, Throwable exception, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger, OA2ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap tBackup, TXRecord txRecord)
protected static void
ppξ(Throwable throwable, Object callingObject, OA2SE oa2SE, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger, String message)
Pretty print the exception.protected static void
rollback(OA2SE oa2SE, edu.uiuc.ncsa.security.storage.XMLMap backup, TXRecord txRecord)
static String
truncateStackTrace(Throwable e, int n, boolean printIt)
Take a stack trace and print the first n lines of it.protected static String
truncateStackTrace2(Throwable e, int n, boolean printIt)
-
-
-
Method Detail
-
handleScriptEngineException
public static void handleScriptEngineException(Object callingObject, OA2SE oa2SE, Throwable t, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger, OA2ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap tBackup)
-
handleScriptEngineException
public static void handleScriptEngineException(Object callingObject, OA2SE oa2SE, Throwable exception, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger, OA2ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap tBackup, TXRecord txRecord)
- Parameters:
callingObject
-oa2SE
-exception
-debugger
-transaction
-tBackup
-txRecord
-
-
rollback
protected static void rollback(OA2SE oa2SE, edu.uiuc.ncsa.security.storage.XMLMap backup, TXRecord txRecord)
-
truncateStackTrace
public static String truncateStackTrace(Throwable e, int n, boolean printIt)
Take a stack trace and print the first n lines of it.- Parameters:
e
-n
-- Returns:
- the truncated stack trace
-
truncateStackTrace2
protected static String truncateStackTrace2(Throwable e, int n, boolean printIt)
-
ppξ
protected static void ppξ(Throwable throwable, Object callingObject, OA2SE oa2SE, edu.uiuc.ncsa.security.core.util.MetaDebugUtil debugger, String message)
Pretty print the exception. This decides what to print and shortens the stack trace.- Parameters:
throwable
-callingObject
-debugger
-message
-
-
-