From d2788cb2f01f9f2baeef3d3ac705133282dcd27c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 27 Aug 2018 18:00:55 -0700 Subject: [PATCH] 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 --- hack/make.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/make.ps1 b/hack/make.ps1 index f15f8ef225..de6e7d9974 100644 --- a/hack/make.ps1 +++ b/hack/make.ps1 @@ -437,6 +437,7 @@ Try { } Catch [Exception] { Write-Host -ForegroundColor Red ("`nERROR: make.ps1 failed:`n$_") + Write-Host -ForegroundColor Red ($_.InvocationInfo.PositionMessage) # More gratuitous ASCII art. Write-Host