[]
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Try it online!
So, PowerShell has ... verbose ... error messages. Additionally, most non-syntax error messages are Runtime Exceptions, meaning that they're non-fatal, which reduces this problem to needing to find a short parsing error.
I think this is one of the shortest, if not the shortest, @TessellatingHeckler has demonstrated this is the shortest parsing error, and it still weighs in at 188
bytes just for the error message. So we basically need to append enough 1
s to reach 189
bytes of "code."
Running this locally on c:\a.ps1
for example, will cut down on the byte count by a handful as it's just a shorter file path, but then it's not available on TIO.
Produces error:
At /tmp/home/.code.tio.ps1:1 char:2
+ []
+ ~
Missing type name after '['.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingTypename
__main__.CodeException: Raised an &rror.
" my error or is this:"Raised an &rror.
" \$\endgroup\$ – FantaC Dec 25 '17 at 17:13