mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 20:12:23 +00:00
Check for undefined layer and throw on collision actor insertion
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
namespace MonoGame.Extended.Collisions.Layers;
|
||||
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Thrown when the collision system has no layer defined with the specified name
|
||||
/// </summary>
|
||||
public class UndefinedLayerException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Thrown when the collision system has no layer defined with the specified name
|
||||
/// </summary>
|
||||
/// <param name="layerName">The undefined layer name</param>
|
||||
public UndefinedLayerException(string layerName)
|
||||
: base($"Layer with name '{layerName}' is undefined")
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user