| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Александр Петросян (PAF) 14.01.2005 12:17 / 14.01.2005 12:18
Было@main[]
^first[]
^if(def $error){
^if(^error.pos[koshmar]>=0){
$error, TODO:recover
}{
$error, TODO:die
}
}
@first[]
^second[]
^if(!def $error){
working1
}
@second[]
^if(^math:random(2)){
$error[koshmar,test1]
}
^if(!def $error){
working2
^if(^math:random(2)){
$error[uzhas,test2]
}
^if(!def $error){
working3
}
}Стало @main[]
^try{
^first[]
}{
^if($exception.type eq koshmar){
$exception.source [$exception.type]
$exception.handled(1)
}
}
@first[]
^second[]
working1
@second[]
^if(^math:random(2)){
^throw[koshmar;test1]
}
working2
^if(^math:random(2)){
^throw[uzhas;test2]
}
working3т.е. ушли все if(!def $error)