You'd probably want to catch a com.google.gdata.util.ServiceException
instead of the generic Exception class, but there's no specific
exception thrown for NoLinkedYouTubeAccount errors, so examining the
exceptions properties or taking a look at the stack trace is going to
be necessary to detect that specific error.
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On Jan 3, 9:37 am, Lucas <travalle...@gmail.com> wrote:
> below is how i capture the error, may i know what technique do you
> follks using ?
>
> try{
>
> service.getFormUploadToken(..)
>
> }catch(Exception e){
>
> if(e.printStack().contains("NoLinkedYouTubeAccount"){
> //do something
>
>
>
>
>
>
>
> }
> }
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment