This commit is contained in:
2021-03-17 10:24:34 +01:00
parent 45696f2d19
commit 6871d6952f
3 changed files with 29 additions and 3 deletions

View File

@@ -2,6 +2,12 @@
Public Class PluginManager
''' <summary>
''' Gets or sets an indicator if an exception should throw on error while loading a plugin.
''' </summary>
''' <returns></returns>
Public Property ThrowOnError As Boolean = False
''' <summary>
''' The name of the type where to search for Methods when loading a new Plugin.
''' </summary>
@@ -79,7 +85,11 @@ Public Class PluginManager
If addToList Then Plugins.Add(filePath, plugin)
Return plugin
Catch ex As Exception
Return Nothing
If ThrowOnError Then
Throw
Else
Return Nothing
End If
End Try
End Function