- if (webdavpath == null) return null;\r
- return baseurl + webdavpath;\r
- } catch (Exception e) {\r
- e.printStackTrace();\r
- return null;\r
+ if (baseurl == null || webdavpath == null) \r
+ throw new AccountNotFoundException(account, "Account not found", null);\r
+ \r
+ return baseurl + webdavpath;\r
+ }\r
+ \r
+ \r
+ public static class AccountNotFoundException extends AccountsException {\r
+ \r
+ /** Generated - should be refreshed every time the class changes!! */\r
+ private static final long serialVersionUID = -9013287181793186830L;\r
+ \r
+ private Account mFailedAccount; \r
+ \r
+ public AccountNotFoundException(Account failedAccount, String message, Throwable cause) {\r
+ super(message, cause);\r
+ mFailedAccount = failedAccount;\r
+ }\r
+ \r
+ public Account getFailedAccount() {\r
+ return mFailedAccount;\r