src/Pure/Tools/server_commands.scala
changeset 67916 a72f01c63262
parent 67914 9f82f6cc3bfc
child 67919 dd90faed43b2
equal deleted inserted replaced
67915:d827728b74b3 67916:a72f01c63262
   151       JSON.uuid(json, "session_id")
   151       JSON.uuid(json, "session_id")
   152 
   152 
   153     def command(session: Thy_Resources.Session): (JSON.Object.T, Process_Result) =
   153     def command(session: Thy_Resources.Session): (JSON.Object.T, Process_Result) =
   154     {
   154     {
   155       val result = session.stop()
   155       val result = session.stop()
   156       val result_json = JSON.Object("return_code" -> result.rc)
   156       val result_json = JSON.Object("ok" -> result.ok, "return_code" -> result.rc)
   157 
   157 
   158       if (result.ok) (result_json, result)
   158       if (result.ok) (result_json, result)
   159       else throw new Server.Error("Session shutdown failed: return code " + result.rc, result_json)
   159       else throw new Server.Error("Session shutdown failed: return code " + result.rc, result_json)
   160     }
   160     }
   161   }
   161   }