Exceptions - Leo-Corporation/LeoCorpLibrary GitHub Wiki
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 LeoCorpLibraryIn 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.RGBInvalidValueExceptionHere'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.HEXInvalidValueExceptionHere'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.InvalidGuidLenghtExceptionHere's an example of usage:
C#
throw new InvalidGuidLenghtException("Message here");VB
Throw New InvalidGuidLenghtException("Message here")