aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-03-23 15:54:20 -0700
committerRob Mensching <rob@firegiant.com>2021-03-23 16:37:06 -0700
commit42b570e34f9cfadbf6f6135cd6b55630c13538be (patch)
treeaba8f7048acc2fcd5f4f1286577e87c1e5c636c1 /src/WixToolset.Core.WindowsInstaller
parent26442d4177bd6e108f2cf4cc2fb2599e624ff6c4 (diff)
downloadwix-42b570e34f9cfadbf6f6135cd6b55630c13538be.tar.gz
wix-42b570e34f9cfadbf6f6135cd6b55630c13538be.tar.bz2
wix-42b570e34f9cfadbf6f6135cd6b55630c13538be.zip
Throw WixException for internal errors and Messaging for user errors
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
index 7d75d74c..5e72ec5c 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
@@ -67,7 +67,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
67 } 67 }
68 else // not a supported unscheduled action. 68 else // not a supported unscheduled action.
69 { 69 {
70 throw new InvalidOperationException($"Found an action [{actionSymbol.Id.Id}] at [{actionSymbol.SourceLineNumbers}] with no Sequence, Before, or After column set."); 70 throw new WixException($"Found action '{actionSymbol.Id.Id}' at {actionSymbol.SourceLineNumbers}' with no Sequence, Before, or After column set. The compiler should have prevented this.");
71 } 71 }
72 } 72 }
73 73
@@ -580,7 +580,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
580 } 580 }
581 else if (actionSymbol.Before == null) 581 else if (actionSymbol.Before == null)
582 { 582 {
583 throw new InvalidOperationException($"Found an action [{actionSymbol.Id.Id}] at [{actionSymbol.SourceLineNumbers}] with no Sequence, Before, or After column set."); 583 throw new WixException($"Found action '{actionSymbol.Id.Id}' at {actionSymbol.SourceLineNumbers}' with no Sequence, Before, or After column set. The compiler should have prevented this.");
584 } 584 }
585 585
586 var parentActionName = (after ? actionSymbol.After : actionSymbol.Before); 586 var parentActionName = (after ? actionSymbol.After : actionSymbol.Before);
@@ -598,7 +598,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
598 } 598 }
599 else 599 else
600 { 600 {
601 throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, "Found an action with a non-existent {0} action: {1}.", (after ? "After" : "Before"), parentActionName)); 601 throw new WixException($"Found action {actionSymbol.Id.Id} with a non-existent {(after ? "After" : "Before")} action '{parentActionName}'. The linker should have prevented this.");
602 } 602 }
603 } 603 }
604 604
@@ -639,11 +639,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
639 } 639 }
640 else if (existingInitialActionSymbol == actionSymbol) 640 else if (existingInitialActionSymbol == actionSymbol)
641 { 641 {
642 throw new WixException(ErrorMessages.ActionCircularDependency(currentActionSymbol.SourceLineNumbers, currentActionSymbol.SequenceTable.ToString(), currentActionSymbol.Action, previousActionSymbol.Action)); 642 this.Messaging.Write(ErrorMessages.ActionCircularDependency(currentActionSymbol.SourceLineNumbers, currentActionSymbol.SequenceTable.ToString(), currentActionSymbol.Action, previousActionSymbol.Action));
643 } 643 }
644 644
645 parentActionSymbol = this.GetParentActionSymbol(currentActionSymbol, requiredActionSymbols); 645 parentActionSymbol = this.GetParentActionSymbol(currentActionSymbol, requiredActionSymbols);
646 } while (null != parentActionSymbol); 646 } while (null != parentActionSymbol && !this.Messaging.EncounteredError);
647 } 647 }
648 648
649 /// <summary> 649 /// <summary>