]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.api.acr/src/org/argeo/api/acr/ContentNotFoundException.java
1 package org
.argeo
.api
.acr
;
4 * When a content was requested which does not exists, equivalent to HTTP code
7 public class ContentNotFoundException
extends RuntimeException
{
8 private static final long serialVersionUID
= -8629074900713760886L;
10 private final String path
;
12 public ContentNotFoundException(ContentSession session
, String path
, Throwable cause
) {
13 super(message(session
, path
), cause
);
15 // we don't keep reference to the session for security reasons
18 public ContentNotFoundException(ContentSession session
, String path
) {
19 this(session
, path
, (String
) null);
22 public ContentNotFoundException(ContentSession session
, String path
, String message
) {
23 super(message
!= null ? message
: message(session
, path
));
25 // we don't keep reference to the session for security reasons
28 private static String
message(ContentSession session
, String path
) {
29 return "Content " + path
+ "cannot be found.";
32 public String
getPath() {