LogError() 공개 정적인 메소드

public static LogError ( Exception ex ) : void
ex System.Exception
리턴 void
예제 #1
0
        public void StartQuest(string questName)
        {
            var quest = Quests.FirstOrDefault(q => q.Name == questName);

            if (quest != null)
            {
                quest.Start(false);
            }
            else
            {
                RPGLog.LogError("Failed to start quest. Quest not found: " + questName);
            }
        }
예제 #2
0
        private void OnTick(object sender, EventArgs e)
        {
            //var s = new Stopwatch();
            //s.Start();

            if (CannotUpdate())
            {
                return;
            }
            try
            {
                if (_emptyUpdate)
                {
                    _emptyUpdate = false;
                    return;
                }

                if (_firstUpdate)
                {
                    Start();
                    _firstUpdate = false;
                }

                Update();
            }
            catch (Exception ex)
            {
                if (!(ex is ThreadAbortException))
                {
                    RPGLog.LogError(ex.GetType() + ": " + ex.Message + "\n" + ex.StackTrace);
                    RPGLog.Log("Terminated script: " + GetType());
                    _running = false;
                }
            }

            //if (s.ElapsedMilliseconds > 0)
            //    RPGLog.Log(GetType() + " took " + s.ElapsedMilliseconds + " to tick.");
        }