BinarySkinFormatException
The exception thrown for a skin file that is not JSON, or is JSON that does not describe a skin. The message names the line and column of the mistake.
public class BinarySkinFormatException : FormatException
Inherits from / implements: FormatException
Remarks
BinarySkinSerializer throws it with a message written for the person editing the file,
such as Line 6, column 15: "#12345" is not a colour. Write it #RRGGBB or #AARRGGBB., so it
can be shown to them as it is.
Examples
try
{
BinarySkinManager.Apply(BinarySkinSerializer.Load(path));
}
catch (BinarySkinFormatException ex)
{
MessageBox.Show(ex.Message, "This skin file cannot be used");
}Members at a glance
| Constructors | |
|---|---|
BinarySkinFormatException | Creates the exception with the default message and no position. |
BinarySkinFormatException | Creates the exception with a message and no position. |
BinarySkinFormatException | Creates the exception with a message and the error that caused it. |
BinarySkinFormatException | Creates the exception with a message and the place in the file it is about. The message is prefixed
with "Line line, column column: ". |
| Properties | |
Column | Gets the column of the mistake. |
Line | Gets the line of the mistake. |
Constructors
BinarySkinFormatException
Creates the exception with the default message and no position.
BinarySkinFormatException
Creates the exception with a message and no position.
Parameters
message- What is wrong.
BinarySkinFormatException
Creates the exception with a message and the error that caused it.
Parameters
message- What is wrong.
innerException- The error that caused it.
BinarySkinFormatException
Creates the exception with a message and the place in the file it is about. The message is prefixed
with "Line line, column column: ".
Parameters
message- What is wrong.
line- The line, counted from 1.
column- The column, counted from 1.
Properties
Column
Gets the column of the mistake.
- Value
- Counted from 1; 0 when the message is not about one place.
Line
Gets the line of the mistake.
- Value
- Counted from 1; 0 when the message is not about one place.