Last active
August 29, 2015 14:02
-
-
Save zakki/d0fb56b3281d300c652f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int code_execcmd( void ) | |
{ | |
//... | |
try { | |
while(1) { | |
if ( GetTypeInfoPtr( type )->cmdfunc( val ) ) { // タイプごとの関数振り分け | |
if ( hspctx->runmode == RUNMODE_RETURN ) { | |
cmdfunc_return(); | |
} else { | |
hspctx->msgfunc( hspctx ); | |
} | |
if ( hspctx->runmode == RUNMODE_END ) { | |
return RUNMODE_END; | |
} | |
} | |
} | |
} | |
catch( HSPERROR code ) { // HSPエラー例外処理 | |
if ( code == HSPERR_NONE ) { | |
i = RUNMODE_END; | |
} else if ( code == HSPERR_INTJUMP ) { | |
goto rerun; | |
} else if ( code == HSPERR_EXITRUN ) { | |
i = RUNMODE_EXITRUN; | |
} else { | |
i = RUNMODE_ERROR; | |
hspctx->err = code; | |
hspctx->runmode = i; | |
if ( code_isirq( HSPIRQ_ONERROR ) ) { | |
code_sendirq( HSPIRQ_ONERROR, 0, (int)code, code_getdebug_line() ); | |
if ( hspctx->runmode != i ) goto rerun; | |
return i; | |
} | |
} | |
} | |
hspctx->runmode = i; | |
return i; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment