This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Exceptions
Léo Peyronnet edited this page Jun 5, 2021
·
8 revisions
This page explain a bit more about LeoCorpLibrary's custom exceptions.
Do not forget to put this line of code on top of your code file:
C#
using LeoCorpLibrary;
VB
Imports LeoCorpLibrary
In this section, you will find all exceptions thrown when a problem occurs
Compatibility
Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
---|---|---|
.NET 5 | ✔ | ✔ |
.NET Core 3.1 | ✔ | ✔ |
.NET Framework 4.7.2 | ✔ | ✔ |
.NET Framework 4.5 | ❌ | ✔ |
This exception is thrown when a value int
for instance, doesn't have a valid RGB format: The number must be between 0 and 255 included.
It's in:
LeoCorpLibrary.Exceptions.RGBInvalidValueException
Here's an example of usage:
C#
throw new RGBInvalidValueException("Message here");
VB
Throw New RGBInvalidValueException("Message here")
Compatibility
Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
---|---|---|
.NET 5 | ✔ | ✔ |
.NET Core 3.1 | ✔ | ✔ |
.NET Framework 4.7.2 | ✔ | ✔ |
.NET Framework 4.5 | ❌ | ✔ |
This exception is thrown when a string
doesn't have a valid HEX format.
It's in:
LeoCorpLibrary.Exceptions.HEXInvalidValueException
Here's an example of usage:
C#
throw new HEXInvalidValueException("Message here");
VB
Throw New HEXInvalidValueException("Message here")
Compatibility
Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
---|---|---|
.NET 5 | ✔ | ✔ |
.NET Core 3.1 | ✔ | ✔ |
.NET Framework 4.7.2 | ✔ | ✔ |
.NET Framework 4.5 | ❌ | ✔ |
This exception is thrown when the specified length for a Guid is invalid. A valid Guid length is an integer between 1 and 32. The default length is 32.
It's in:
LeoCorpLibrary.Exceptions.InvalidGuidLenghtException
Here's an example of usage:
C#
throw new InvalidGuidLenghtException("Message here");
VB
Throw New InvalidGuidLenghtException("Message here")
© 2021 Léo Corporation and contributors