System.exit(1) troubles


    Apr 11 2006 | 11:23 am
    When used into max world, exceptions and exit statements like System.exit(1) lead to a major windows crash (i mean over 100% for 20min, no way to get the task manager up, dirty reboot). Is it just me or do we have to define another way to terminate the process when we got an execption ? What if we just keep, for example, the e.printStackTrace();, but erase the System.exit(1); ??
    best regards
    f.e
    -- f.e chanfrault | aka | personal computer music > >>>>>> http://www.personal-computer-music.com > >>>>>> objects for max/msp | C, java & python

    • Apr 11 2006 | 12:14 pm
      I don't think the jvm can quit max this way (ben or topher, correct me if i'm wrong). I found a workaround by sending a bang in a [; max quit] messagebox.
      If your error appears at object instantiation, use the bail() method (like bogus).
      Exceptions should be caught and they should terminate the process only when major errors appears. In my opinion, you should output major errors to max window or to a log file.
      Léo
    • Apr 11 2006 | 12:18 pm
      Thanks again, Leopold. I forgot about bail()...
      cheers
      f.e
      f.e chanfrault | aka | personal computer music > >>>>>> http://www.personal-computer-music.com > >>>>>> objects for max/msp | C, java & python
    • Apr 11 2006 | 5:22 pm