@@ -20,16 +20,16 @@ import type {
2020import { Chapter , type Variant } from './langs'
2121import { assemble } from './vm/svml-assembler'
2222import { compileToIns } from './vm/svml-compiler'
23- export { SourceDocumentation } from './editors/ace/docTooltip'
2423
2524import { CSEResultPromise , resumeEvaluate } from './cse-machine/interpreter'
2625import { ModuleNotFoundError } from './modules/errors'
2726import type { ImportOptions } from './modules/moduleTypes'
2827import preprocessFileImports from './modules/preprocessor'
2928import { validateFilePath } from './modules/preprocessor/filePaths'
3029import { getKeywords , getProgramNames , type NameDeclaration } from './name-extractor'
31- import { htmlRunner , resolvedErrorPromise , sourceFilesRunner } from './runner'
30+ import { htmlRunner , sourceFilesRunner } from './runner'
3231import { SourceError } from './errors/base'
32+ export { SourceDocumentation } from './editors/ace/docTooltip'
3333
3434export interface IOptions {
3535 steps : number
@@ -219,7 +219,7 @@ export async function runFilesInContext(
219219 const filePathError = validateFilePath ( filePath )
220220 if ( filePathError !== null ) {
221221 context . errors . push ( filePathError )
222- return resolvedErrorPromise
222+ return { status : 'error' , context }
223223 }
224224 }
225225
@@ -228,7 +228,7 @@ export async function runFilesInContext(
228228 const code = files [ entrypointFilePath ]
229229 if ( code === undefined ) {
230230 context . errors . push ( new ModuleNotFoundError ( entrypointFilePath ) )
231- return resolvedErrorPromise
231+ return { status : 'error' , context }
232232 }
233233 result = await htmlRunner ( code , context , options )
234234 } else {
0 commit comments