GodotException.cs 374 B

12345678910111213141516171819
  1. using System;
  2. using Godot;
  3. namespace TBL.GodotSharp
  4. {
  5. /// <summary>
  6. /// Godot 异常
  7. /// </summary>
  8. public class GodotException : Exception
  9. {
  10. public GodotException(Error error) : this(error, string.Empty)
  11. {
  12. }
  13. public GodotException(Error error, string message) : base($"{message}[{error}]")
  14. {
  15. }
  16. }
  17. }