.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user