src/Pure/System/main.scala
author wenzelm
Fri, 04 May 2012 15:58:27 +0200
changeset 47867 dd9cbe708e6b
parent 47664 3f9681ca7040
child 48192 07a32140ce0d
permissions -rw-r--r--
some attempts to make critical errors fit on screen;

/*  Title:      Pure/System/main.scala
    Author:     Makarius

Default Isabelle application wrapper.
*/

package isabelle

import scala.swing.TextArea


object Main
{
  def main(args: Array[String]) =
  {
    val (out, rc) =
      try {
        Platform.init_laf()
        Isabelle_System.init()
        Isabelle_System.isabelle_tool("jedit", args: _*)
      }
      catch { case exn: Throwable => (Exn.message(exn), 2) }

    if (rc != 0)
      Library.dialog(null, "Isabelle", "Isabelle output",
        Library.scrollable_text(out + "\nReturn code: " + rc))

    System.exit(rc)
  }
}