Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What kind of Exception is thrown when PageManager couldn't find a Page?

Javier Rodriguez April 7, 2016

I got this code in my macro.

page = pageManager.getPage(spaceKey, pageTitle);

The values spaceKey and pageTitle come from the macro's parameters, i don't want to make them required so i need to manipulate possible errors.

 

Thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Robert Krause
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2016

Hi Javier,

no exception will be thrown, if a page is not found. You need to check, if the method returns null.

 

Best regards,
Robert

TAGS
AUG Leaders

Atlassian Community Events