Annotation of parser3/tests/452.html, revision 1.1

1.1     ! moko        1: @main[]
        !             2: $report[^hash::create[]]
        !             3: 
        !             4: # Materialization preserves handled; aliases see changes, copies do not.
        !             5: ^try{^fail[]}{
        !             6:        $exception.handled(true)
        !             7:        $alias[$exception]
        !             8:        $exception.type[changed.type]
        !             9:        $exception.source[changed.source]
        !            10:        $exception.comment[changed comment]
        !            11:        $exception.file[changed.p]
        !            12:        $exception.lineno(123)
        !            13:        $exception.colno(45)
        !            14:        $exception.extra[extra value]
        !            15:        $copy[^hash::create[$exception]]
        !            16:        $alias.comment[after copy]
        !            17:        ^exception.delete[source]
        !            18:        $report.changed[$exception]
        !            19:        $report.copy[$copy]
        !            20: }
        !            21: 
        !            22: # A fields reference must change the handled value checked by try.
        !            23: ^try{^fail[]}{
        !            24:        $reference[^reflection:fields_reference[$exception]]
        !            25:        $reference.handled(true)
        !            26:        $reference.comment[via reference]
        !            27:        $report.reference[^summary[$exception]]
        !            28: }
        !            29: 
        !            30: # Resetting or removing handled propagates the original C++ exception.
        !            31: ^propagate[reset]
        !            32: ^propagate[delete]
        !            33: 
        !            34: # Explicit throw reads the changed diagnostic fields.
        !            35: ^try{
        !            36:        ^try{^fail[]}{
        !            37:                $exception.type[rethrow.type]
        !            38:                $exception.source[rethrow.source]
        !            39:                $exception.comment[rethrow comment]
        !            40:                $exception.handled(true)
        !            41:                ^throw[$exception]
        !            42:        }
        !            43: }{
        !            44:        $exception.handled(true)
        !            45:        $report.rethrow[^summary[$exception]]
        !            46: }
        !            47: 
        !            48: # Clearing the hash and setting handled again must still handle the error.
        !            49: ^try{^fail[]}{
        !            50:        ^exception.delete[]
        !            51:        $exception.handled(true)
        !            52:        $report.cleared[$exception]
        !            53: }
        !            54: 
        !            55: # Check mutation in unhandled_exception as well.
        !            56: ^fail[]
        !            57: 
        !            58: @fail[]
        !            59: ^throw[original.type;fail;original comment]
        !            60: 
        !            61: @propagate[mode]
        !            62: ^try{
        !            63:        ^try{^fail[]}{
        !            64:                $exception.handled(true)
        !            65:                $exception.type[ignored.type]
        !            66:                $exception.comment[ignored comment]
        !            67:                ^if($mode eq 'reset'){
        !            68:                        $exception.handled(false)
        !            69:                }{
        !            70:                        ^exception.delete[handled]
        !            71:                }
        !            72:        }
        !            73:        $report.unexpected[exception was swallowed]
        !            74: }{
        !            75:        $exception.handled(true)
        !            76:        $report.$mode[^summary[$exception]]
        !            77: }
        !            78: 
        !            79: @summary[error]
        !            80: $result[$.type[$error.type] $.source[$error.source] $.comment[$error.comment] $.handled($error.handled)]
        !            81: 
        !            82: @unhandled_exception[exception;stack]
        !            83: $exception.comment[top level comment]
        !            84: $exception.handled(true)
        !            85: $report.unhandled[^summary[$exception]]
        !            86: ^json:string[$report]

E-mail: