From 926fcd486d04d074b9dcda3319dca742d5db0a59 Mon Sep 17 00:00:00 2001
From: biwa <6475593+biwa@users.noreply.github.com>
Date: Sat, 8 May 2021 09:44:19 +0200
Subject: [PATCH] Visplane Explorer: added some additional error reporting when
 loading a map fails

---
 Source/Plugins/VisplaneExplorer/VPOManager.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Plugins/VisplaneExplorer/VPOManager.cs b/Source/Plugins/VisplaneExplorer/VPOManager.cs
index 44827c0ad..58ff5f0e7 100755
--- a/Source/Plugins/VisplaneExplorer/VPOManager.cs
+++ b/Source/Plugins/VisplaneExplorer/VPOManager.cs
@@ -102,8 +102,8 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer
 
 			// Load the map
 			bool isHexen = General.Map.HEXEN;
-			if(VPO_LoadWAD(context, filename) != 0) throw new Exception("VPO is unable to read this file.");
-			if(VPO_OpenMap(context, mapname, ref isHexen) != 0) throw new Exception("VPO is unable to open this map.");
+			if(VPO_LoadWAD(context, filename) != 0) throw new Exception("VPO is unable to read this file:" + (VPO_GetError(context) ?? "<unknown error>"));
+			if(VPO_OpenMap(context, mapname, ref isHexen) != 0) throw new Exception("VPO is unable to open this map:" + (VPO_GetError(context) ?? "<unknown error>"));
 			VPO_OpenDoorSectors(context, BuilderPlug.InterfaceForm.OpenDoors ? 1 : -1); //mxd
 
 			// Processing
-- 
GitLab