using System;

namespace PkmnLibSharp.Utilities
{
    internal static class ResultChecker
    {
        internal static void Assert(this byte result)
        {
            if (result == 0) return;
            if (result == 1)
            {
                throw new NativeException("CreatureLib", Creatureliblibrary.Generated.C.GetLastException().PtrString());
            }
            if (result == 2)
            {
                throw new NativeException("PkmnLib", Pkmnlib.Generated.C.GetLastException().PtrString());
            }
        }
    }
}