Execute the file in its engine.
The file to pass in as file
f into the child transaction.
Provide null or undefined to omit.
Additional options for the execution.
Optional. Context file to use within the child transaction. Defaults to the current transaction’s context.
Optional. Request file to use within the child transaction. Defaults to an empty file.
Execute the file in the engine defined by its type, in a new transaction, in an isolated VM.
Let’s assume the following form:
This form is more generic than
does not need to be on the type chain of
Note that no post-processing is performed, thus the result of
inline.exec(f) will be slightly different
f.inline() which does apply some post-processing,
for example it extracts the body of the generated
passes on Content-Security-Policy rules, head entries and
updates the statusCode of the current transaction’s response file.
Execute a file without passing in an
.Inline method of an app, returning
Execute a custom
hello source file that is not
on the type chain of
f. In this example, the
f has a broken type chain which is okay
Increment a counter.
Request file defaults to a new, empty file.
Pass in custom request file.
Context file defaults to that of the current transaction.
Custom context file.
You can pass in
undefined to omit the file
You can pass in
null to omit the file
f is provided, it will always show up as
undefined within the child exeuction context.
When the result contains an unhandled error, it will be thrown.
Here we catch it in a try-catch block.
Throws an error for unexpected options keys.
An error is thrown in a child execution context. Due to the unhandled error, the child transaction is rolled back.
The transaction is not rolled back merely by returning a non-success response, only if an unhandled error occurred.