001package com.randomnoun.common.exception; 002 003/** An exception which is thrown by DAOs when an objectId is supplied that doesn't 004 * have a record in the database. 005 * 006 * <p>Would typically be caused by a user deleting an object, then hitting the back button on their browser 007 * to an object editor page showing that object, and then hitting reload. 008 * 009 * <p>I used to use IllegalArgumentExceptions for this, but now these are being caught and acted upon 010 * in the Action classes, I thought it better to use a new exception type. 011 * 012 * @author knoxg 013 */ 014public class ObjectNotFoundException extends RuntimeException { 015 016 /** generated serialVersionUID */ 017 private static final long serialVersionUID = -2560326697104634124L; 018 019 public ObjectNotFoundException(String message) { 020 super(message); 021 } 022 023 public ObjectNotFoundException(String message, Throwable cause) { 024 super(message, cause); 025 } 026 027}