close the driver on crash
This commit is contained in:
parent
c091d0cdd0
commit
025d42b44a
1 changed files with 6 additions and 1 deletions
|
@ -6,7 +6,12 @@ open Twitter
|
|||
let start driver =
|
||||
let name_driver = prepare driver in
|
||||
let data_driver = run_process name_driver [] in
|
||||
let session_id = get_session () in
|
||||
let session_id =
|
||||
try get_session () with
|
||||
| Any msg ->
|
||||
stop_process data_driver;
|
||||
raise (Any ("Can't get the session ID: " ^ msg))
|
||||
in
|
||||
data_driver, session_id
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue