1 15 16 package org.jahia.exceptions; 17 18 19 26 public class JahiaPageNotFoundException extends JahiaException 27 { 28 private int mPageID; 29 30 35 public JahiaPageNotFoundException (int pageID) 36 { 37 super ("404 Not found - Page:" + pageID, 38 "404 error - page ["+pageID+"] could not be found in the database or is no longer accessible.", 39 PAGE_ERROR, ERROR_SEVERITY); 40 41 mPageID = pageID; 42 } 43 44 49 50 public JahiaPageNotFoundException (String pageIDStr) 51 { 52 super ("404 Not found - Page:" + pageIDStr, 53 "404 error - page ["+pageIDStr+"] could not be found in the database or is no longer accessible.", 54 PAGE_ERROR, ERROR_SEVERITY); 55 56 try { 57 mPageID = Integer.parseInt (pageIDStr); 58 } 59 catch (NumberFormatException ex) { 60 mPageID = -1; 61 } 62 } 63 64 public JahiaPageNotFoundException (int pageID, String languageCode, String operationMode) 65 { 66 super ("404 Not found - Page:" + pageID, 67 "404 error - page ["+pageID+"] could not be found for language ["+languageCode+"] in ["+operationMode+"] mode .", 68 PAGE_ERROR, ERROR_SEVERITY); 69 70 mPageID = pageID; 71 } 72 73 76 public final int getPageID () { 77 return mPageID; 78 } 79 80 } 81 | Popular Tags |