A user is reporting to me that he gets an InvalidFormatException. The stack trace looks like this:
25 Jun 2020 10:35:48 FATAL: Error - fatal exception 'UnsupportedFormatException', number 0
25 Jun 2020 10:35:48 FATAL: Reason: The path passed into new FolderItem was invalid
25 Jun 2020 10:35:48 FATAL: Message: The path passed into new FolderItem was invalid
25 Jun 2020 10:35:48 FATAL: Stack: RuntimeRaiseException
25 Jun 2020 10:35:48 FATAL: _Z27RaiseExceptionClassWMessageRK13ClassDeclBase6stringl
25 Jun 2020 10:35:48 FATAL: FolderItemPathModeAndAliasCtor
25 Jun 2020 10:35:48 FATAL: FolderItem.Constructor%%o<FolderItem>si8<FolderItem.PathModes>b
25 Jun 2020 10:35:48 FATAL: email.imageWrite%%o<email>u8ssssi8f8f8
which tells me it's in my imageWrite method. Further, there's only one "new FolderItem" in the method, which looks like this:
Var s as String, f as FolderItem s = "/path/to/some/myfile" f = new FolderItem (s, FolderItem.PathModes.Native)
So I'm concluding that some part of s must contain invalid characters, an idea which is supported by the doc for InvalidFormatException. But what characters are invalid? I've tested with a non-existent path, but the FolderItem is created OK, so it can't be that (what happens with a non-existent path is an IOException if I try to create the file).
It's not slash (/) or colon (:), as I already filter those out. So what characters can generate an InvalidFormatException? StackExchange doesn't appear to think any character is invalid.
User's doing this under macOS.