Compare commits

...

2 Commits

Author SHA1 Message Date
Denis Knauf 92060db994 More readable description for RobusServer-class. 2021-11-30 14:09:35 +01:00
Denis Knauf 0e90737ae1 ignore pkg and vi-tempfiles 2013-04-15 16:17:31 +02:00
2 changed files with 9 additions and 6 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.*.swp
pkg

View File

@ -95,14 +95,15 @@ end
# Easy problem-handler for your Server.
#
# A Server should never crash.
# If an Exception raised, which is not rescued, your program will shutdown abnormaly.
# Or if a signal tries to "kill" your program, your program will shutdown abnormaly too.
# Problem: Your process should not crash, it should be available for anytime.
# If an exception will be raised, you have to handle it, or it will be shutdown abnormaly.
# Or if a signal tries to "kill" your program, your program will shutdown abnormaly, too.
#
# With RobustServer these errors will be a more unimportant problem and It'll be easier to handle.
# RobustServer handles any exception / kill, logs it and prevents the server to shutting down.
#
# Subclasses should implements *#run*, which will be your main-worker.
# For initializing, you can override **#initialize**, but doen't forget to call **super**.
# For implementation a server, create a subclass of RobustServer and implement the *#run*-method.
# Anytime this *#run*-method returns or an exception will be raised, it will be rescued and run recalled.
# For initialization, you can override **#initialize**, but don't forget to call **super**.
class RobustServer
class UnimplementedRun <Exception
end