diff --git a/tested/languages/javascript/templates/values.js b/tested/languages/javascript/templates/values.js index d6a1a781..99a7eb44 100644 --- a/tested/languages/javascript/templates/values.js +++ b/tested/languages/javascript/templates/values.js @@ -118,24 +118,13 @@ function sendException(stream, exception) { "type": exception.constructor.name })); } else { - // Temporarily allow objects with "message" and "name". - // TODO: remove this once the semester is over - // noinspection PointlessBooleanExpressionJS - if (typeof exception === 'object') { - fs.writeSync(stream, JSON.stringify({ - "message": exception.message ?? "", - "stacktrace": "", - "type": exception.name ?? "" - })); - } else { - // We have something else, so we cannot rely on stuff being present. - fs.writeSync(stream, JSON.stringify({ - "message": JSON.stringify(exception), - "stacktrace": "", - "type": exception.constructor.name ?? (Object.prototype.toString.call(exception)), - "additional_message_keys": ["languages.javascript.runtime.invalid.exception"] - })); - } + // We have something else, so we cannot rely on stuff being present. + fs.writeSync(stream, JSON.stringify({ + "message": JSON.stringify(exception), + "stacktrace": "", + "type": exception.constructor.name ?? (Object.prototype.toString.call(exception)), + "additional_message_keys": ["languages.javascript.runtime.invalid.exception"] + })); } } diff --git a/tested/languages/language.py b/tested/languages/language.py index 1b9f5f57..a6432f82 100644 --- a/tested/languages/language.py +++ b/tested/languages/language.py @@ -138,9 +138,6 @@ def compilation(self, files: list[str]) -> CallbackResult: :param files: A suggestion containing the dependencies TESTed thinks might be useful to compile. By convention, the last file in the list is the file containing the "main" function. - - :param directory: The directory in which these files can be found. - :return: The compilation command and either the resulting files or a filter for the resulting files. """ diff --git a/tested/languages/typescript/linter.py b/tested/languages/typescript/linter.py index 7d5f9d8a..f15ffec7 100644 --- a/tested/languages/typescript/linter.py +++ b/tested/languages/typescript/linter.py @@ -41,7 +41,6 @@ def run_eslint( str(submission.absolute()), ], ) - logger.warning(f"ESLint produced {execution_results}") if execution_results is None: return [], [] diff --git a/tested/languages/typescript/templates/values.ts b/tested/languages/typescript/templates/values.ts index 97a3b2ad..34c34bb9 100644 --- a/tested/languages/typescript/templates/values.ts +++ b/tested/languages/typescript/templates/values.ts @@ -117,24 +117,13 @@ function sendException(stream: number, exception: Error | Object | {constructor: })); } else { // Comes out of the values.js: - // Temporarily allow objects with "message" and "name". - // TODO: remove this once the semester is over - // noinspection PointlessBooleanExpressionJS - if (typeof exception === 'object') { - fs.writeSync(stream, JSON.stringify({ - "message": (exception as Error).message ?? "", - "stacktrace": "", - "type": (exception as Error).name ?? "" - })); - } else { // We have something else, so we cannot rely on stuff being present. - fs.writeSync(stream, JSON.stringify({ - "message": JSON.stringify(exception), - "stacktrace": "", - "type": (exception as Object).constructor.name ?? (Object.prototype.toString.call(exception)), - "additional_message_keys": ["languages.typescript.runtime.invalid.exception"] - })); - } + fs.writeSync(stream, JSON.stringify({ + "message": JSON.stringify(exception), + "stacktrace": "", + "type": (exception as Object).constructor.name ?? (Object.prototype.toString.call(exception)), + "additional_message_keys": ["languages.typescript.runtime.invalid.exception"] + })); } }