The following script causes the Jmol application to freeze when "throw
context" follows any try/catch block within a function.
function x {
    zap
    print _version
    set appendNew false
    x1 ="data \"append a\"\nATOM      1  N   GLY A   1       0.000   0.000
  0.000\nend \"append a\""
    x2 ="data \"append a\"\nATOM      2  CA  GLY A   1       0.200   1.174
  0.911\nend \"append a\""
    x3 ="data \"append a\"\nATOM      3  C   GLY A   1      -1.110   1.668
  1.425\nend \"append a\""
    x4 ="data \"append a\"\nATOM      4  O   GLY A   1      -1.320   1.693
  2.620\nend \"append a\""
    script inline @x1
    script inline @x2
    script inline @x3
    script inline @x4
    connect
    cpk 100
    select @2
    echo 1 thrown context test
    throw context test
    print "before"
    try {
    }
    catch {
    }
    echo 2 thrown context test
    throw context test
    print "after"
}

Results:
$ x
1403007
1 thrown context test
$ &test
before
2 thrown context test
$ &test [application is now irrecoverably frozen]
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to