using System;

namespace Billing
{
    internal static class Helper
    {
        public static void Debug(string message)
        {
            var time = DateTime.Now.ToString("HH:mm:ss.fff");
            System.Diagnostics.Debug.WriteLine($"[{time}] - {message}");
        }

        public static void Error(string category, Exception ex)
        {
            Error(category, ex?.Message ?? "unknown error");
        }

        public static void Error(string category, string message)
        {
            var time = DateTime.Now.ToString("HH:mm:ss.fff");
            System.Diagnostics.Debug.Fail($"[{time}] - {category}", message);
        }
    }
}