File tree 1 file changed +21
-14
lines changed
1 file changed +21
-14
lines changed Original file line number Diff line number Diff line change 70
70
(let ((files (directory (format nil " ~A *" dir))))
71
71
(car (last files))))))
72
72
73
+ (define-condition darkmatter-log-file-not-found (error )
74
+ ((text :initarg :text :reader text)))
75
+
73
76
(defun make-server-process (tbl hostname id)
74
77
(let* ((proc-table (gethash hostname tbl))
75
78
(log-count (%count-darkmatter-log-files))
83
86
(force-output ))
84
87
(terpri )
85
88
(setf path (%get-darkmatter-log-file))
86
- (with-open-file (in path :direction :input )
87
- ( tagbody
88
- start
89
+ (if ( null path)
90
+ ( error ' darkmatter-log-file-not-found
91
+ :text " Not found log file. Make sure work Darkmatter correctly. " )
89
92
(progn
90
- (loop for line = (read-line in nil )
91
- do (setf port (%parse-port-number line))
92
- until (numberp port))
93
- (when (let ((line (read-line in nil )))
94
- (and (stringp line)
95
- (%parse-failure line)))
96
- (go start)))
97
- finish))
98
- (sleep 1 )
99
- (setf (gethash id proc-table)
100
- (make-instance ' server-process :entity entity :port port))
93
+ (with-open-file (in path :direction :input )
94
+ (tagbody
95
+ start
96
+ (progn
97
+ (loop for line = (read-line in nil )
98
+ do (setf port (%parse-port-number line))
99
+ until (numberp port))
100
+ (when (let ((line (read-line in nil )))
101
+ (and (stringp line)
102
+ (%parse-failure line)))
103
+ (go start)))
104
+ finish))
105
+ (sleep 1 )
106
+ (setf (gethash id proc-table)
107
+ (make-instance ' server-process :entity entity :port port))))
101
108
port))
102
109
103
110
(defun delete-server-process-table (tbl)
You can’t perform that action at this time.
0 commit comments