Knud,
> 1. Single line error messages can be captured
> out of the box in the native TSE macro compile.s
> 2. But quite a few computer languages have in
> their output multiple error lines, thus more than one.
> 3. So do you know if by design using TSE <TSE>\mac\compile.s
> those multiple error message lines are possible to capture?
I researched this, and I got three times "no".
The first no:
TSE's compiler set-up identifies each error's message to be shown in the error window by using one regular expression, and in TSE one regular expression cannot capture multiple lines.
The second no:
For example, if your PowerShell example error output is representative for all PowerShell error output, then the first useful error line will not be the first error line, but the first following line that does not start with a "+".
For this you can define a message-rule in TSE's compiler setup.
A compilation from TSE would then not show the error's line number, but the useful error line.
The error's line number is less relevant anyway, because the source file will be positioned on that line.
I tested this with another compiler (see further on), and this worked.
That said, in general this only works with very specific compiler output, and the error window still only shows one line per error, albeit a more useful one.
The third no:
TSE's compiler set-up pretends to allow us to define a "user macro" to compose our own error message per error.
In theory we might use such a user macro to concatenate (parts of) several error lines into one error line.
So, the error window would still show one line per error, but we could scroll that line to the right to see more info.
In practice this "user macro" needs to be a public proc in Semware's "compiler-helper" macro, which is distributed with and might be overwritten by new TSE versions.
Also, "compiler-helper" and the required format and actions of the "user macro" are not documented.
In reality the configurable "user macro" is therefore a Semware macro.
Given these serious disadvantages, if someone really needed multi-line compiler errors in TSE, it would make the more sense that someone, not you of course, would program a new TSE compiler handler.
Aside, fun:
With TSE I created a FizzBuzzCompiler executable, and then set it up in TSE as a compiler for .fizzbuzz files.
(A compiler to check the output of a children's game is not a real-world thing, just a programmer's version of fun.)
For each line it tests that it only contains the line number or "fizz" or "buzz" or "fizzbuzz" in the right line, and otherwise outputs a compiler error.
https://en.wikipedia.org/wiki/Fizz_buzz
Because this gives me complete control of this compiler's error format, I could test all the scenarios that I needed.
Carlo