Browse code

hack/make.ps1: know where we failed

In case of an exception, it makes great sense to print out some
information telling where exactly it happened.

_.InvocationInfo.PositionMessage gives script name, line number,
character position and (depending on the PS version) highlights
the part where error has happened.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2018/08/28 10:00:55
Showing 1 changed files
... ...
@@ -437,6 +437,7 @@ Try {
437 437
 }
438 438
 Catch [Exception] {
439 439
     Write-Host -ForegroundColor Red ("`nERROR: make.ps1 failed:`n$_")
440
+    Write-Host -ForegroundColor Red ($_.InvocationInfo.PositionMessage)
440 441
 
441 442
     # More gratuitous ASCII art.
442 443
     Write-Host