UnsupportedFormatException

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from RuntimeException)

Occurs when the supplied information is in an unsupported format. This can happen in many situations, including: using a String expression that cannot be evaluated, a bad DateTime format or an inaccessible FolderItem path.

Properties
ErrorNumber Message
Methods
Stack StackFrames

Notes

You can use a string expression to set the column widths via the DesktopListBoxColumn class or the ColumnWidths property of the DesktopListBox. You can use the percent sign or the "*" symbol, as described in those sections. If you use a character that is not permitted, an UnsupportedFormatException will occur.

Sample Code

The following specification causes an UnsupportedFormatException runtime error:

ListBox1.ColumnWidths = "50,50i" // not a valid width

Here is a Try statement that catches UnsupportedFormatExceptions when accessing a picture's data.

Try
source = Picture.FromData(file.Data)
Catch err As UnsupportedFormatException
// not a picture
Continue
End Try

See Also

DateTime, FolderItem, DesktopListBox, DesktopListBoxColumn, RuntimeException classes; Exception, Try statements.