Files
Client/Server/ToolProject/RCMS_Tool/ErrorUtil.vb
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

31 lines
1.2 KiB
VB.net

Imports System.Environment
Public Class ErrorUtil
'Exception 에 대한 내용을 EventLog 에 기록한다
Public Shared Sub WriteExceptionIntoEventLog(ByVal objException As Exception)
Dim oEventLog As EventLog = New EventLog()
'Server Version 이 될 시 에러가 발생한 컴퓨터 파악
Dim strComputer As String = Environment.GetEnvironmentVariable("COMPUTERNAME")
If Not oEventLog.SourceExists("BankDotNet") Then
oEventLog.CreateEventSource("BankDotNet", "Application")
End If
oEventLog.Source = "BankDotNet"
oEventLog.WriteEntry(strComputer + "" + objException.Source + "에서 에러가 발생하였습니다." _
+ vbCrLf + objException.Message + vbCrLf + objException.StackTrace, EventLogEntryType.Error)
End Sub
'Message 를 지정된 소스로 기록한다
Public Shared Sub WriteEventLog(ByVal Message As String, ByVal Source As String)
Dim oEventLog As EventLog = New EventLog()
If Not oEventLog.SourceExists(Source) Then
oEventLog.CreateEventSource(Source, "Application")
End If
oEventLog.Source = Source
oEventLog.WriteEntry(Message)
End Sub
End Class