이것은 공상 과학 요청과 같을 것입니다. catch() {}
블록에서 예외가 발생한 try {}
블록의 시작 부분으로 돌아갈 방법이 있습니까?예외에서 돌아 가기
try
{
// make OAuth request
}
catch(OAuthException $e)
{
// if(){}
// If tells me that the Exception was thrown because the access token is expired
// I have alternative access token (that's always up to date, but there is a catch why I void using it)
// I set it as a new access token and want to repeat the try {} block
}
분명히 goto
좀 더 정교한 접근 방식이 있다면하지만, 내가 찾고, 그것을 할 수 있습니다 : 여기
당신이 예외를 잡을 때 다시 호출 후 별도의 함수에 넣어 해봤 캐치 섹션에서 같은 함수를 호출 할 수 있습니다? – DRTauli