Skip to content

Commit

Permalink
Documentation in the SecureDml class
Browse files Browse the repository at this point in the history
Improved stack trace point in security violation exceptions
Improved naming of the violation handlers
Added ability to disable CUD settings checking
  • Loading branch information
rob-baillie-ortoo committed Dec 9, 2021
1 parent a09bb9f commit 89b38df
Show file tree
Hide file tree
Showing 3 changed files with 270 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,19 @@ public virtual class ortoo_Exception extends Exception implements IRenderableMes
return returnList;
}

// TODO: document
// TODO: test
public ortoo_Exception regenerateStackTraceString( Integer levelsToSkip )
{
stackTraceString = createStackTraceString( levelsToSkip + 1 );
return this;
}

private String createStackTraceString( Integer levelsToSkip )
{
return new StackTrace( levelsToSkip+1 ).getFullStackTraceString(); // Since custom exceptions have some problems getting their stack trace strings set,
// we need to get the Stack Trace string from the generic utility, stating that the top
// level method (this one) should be ignored.
return new StackTrace( levelsToSkip + 1 ).getFullStackTraceString(); // Since custom exceptions have some problems getting their stack trace strings set,
// we need to get the Stack Trace string from the generic utility, stating that the top
// level method (this one) should be ignored.
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public class Contract
* @param Boolean The condition that must be true
* @param String The message to emit when the condition is not true
*/

public static void ensures( Boolean condition, String message )
{
if ( !condition )
Expand Down
Loading

0 comments on commit 89b38df

Please sign in to comment.