Skip to content

Commit

Permalink
Rename sanitize stack trace function
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Oct 23, 2024
1 parent 34246be commit 9abd1ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/interpreter/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const successResult = (result: string): ExecutionResult => ({
errored: false,
})

export const sanitizeStackTrace = (e?: Error): string[] => {
export const getStackTraceSanitized = (e?: Error): string[] => {
const indexOfTsStack = e?.stack?.indexOf(WOLLOK_EXTRA_STACK_TRACE_HEADER)
const fullStack = e?.stack?.slice(0, indexOfTsStack ?? -1) ?? ''

Expand Down
2 changes: 1 addition & 1 deletion test/interpreter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, should, use } from 'chai'
import { restore } from 'sinon'
import sinonChai from 'sinon-chai'
import { EXCEPTION_MODULE, Evaluation, REPL, WRENatives, buildEnvironment } from '../src'
import { DirectedInterpreter, interprete, Interpreter, sanitizeStackTrace as getStackTraceSanitized } from '../src/interpreter/interpreter'
import { DirectedInterpreter, interprete, Interpreter, getStackTraceSanitized } from '../src/interpreter/interpreter'
import link from '../src/linker'
import { Body, Class, Field, Literal, Method, Package, ParameterizedType, Reference, Return, Send, Singleton, SourceIndex, SourceMap } from '../src/model'
import { WREEnvironment } from './utils'
Expand Down

0 comments on commit 9abd1ab

Please sign in to comment.