Got an error report from a user regarding an InvalidArgumentException
[quote]2019-02-04, 2:25:38 PM Class/Method: MimeImagePreview.MakeImagePreview
2019-02-04, 2:25:38 PM Time: Monday, February 4, 2019 2:25:38 PM 3565554
2019-02-04, 2:25:38 PM Type of Error: InvalidArgumentException[/quote]
To check what the problem is I wrapped the code with a try/catch:
try
dim image as new GMImageMBS(PreviewPic)
image.autoOrient
PreviewPic = image.CopyPicture(0, 0, image.columns, image.rows)
catch err as InvalidArgumentException
Globals.theAppLog.AddToAppLog("InvalidArgumentException for " + App.MailFields.MainSubject, "")
end try
But why does Xojo tell me: “Can’t find a type with this name. Did you mean Xojo.Core.InvalidArgumentException?” Xojo 2018r3, High Sierra.
The Xojo.Core exception won’t work because it’s not the correct type. It’s a bug somewhere in Christian’s code anyways. I’ll get the data from the user first.
Turns out that there is no InvalidArgumentException, only a Xojo.Core.InvalidArgumentException and the documentation was already updated. Introspection has a FullName in addition to the Name property, which I don’t think is a good idea. But whatever. I can now send something to my user.
I’m willing to bet this is related to the class structure under the hood utilizing modules and such. The framework needs to know the object name but can then calculate the FullName using the object name and the parent namespace.