001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.exp; 020 021import lucee.runtime.config.Config; 022 023/** 024 * 025 */ 026public final class LockException extends PageExceptionImpl { 027 028 /** 029 * Field <code>OPERATION_TIMEOUT</code> 030 */ 031 public static final String OPERATION_TIMEOUT="Timeout"; 032 /** 033 * Field <code>OPERATION_MUTEX</code> 034 */ 035 public static final String OPERATION_MUTEX="Mutex"; 036 /** 037 * Field <code>OPERATION_CREATE</code> 038 */ 039 public static final String OPERATION_CREATE="Create"; 040 /** 041 * Field <code>OPERATION_UNKNOW</code> 042 */ 043 public static final String OPERATION_UNKNOW="Unknown"; 044 045 private String lockName=""; 046 private String lockOperation="Unknown"; 047 048 /** 049 * Class Constuctor 050 * @param operation 051 * @param name 052 * @param message error message 053 */ 054 public LockException(String operation,String name,String message) { 055 super(message,"lock"); 056 this.lockName=name; 057 this.lockOperation=operation; 058 } 059 060 /** 061 * Class Constuctor 062 * @param operation 063 * @param name 064 * @param message error message 065 * @param detail detailed error message 066 */ 067 public LockException(String operation,String name,String message, String detail) { 068 super(message,"lock"); 069 this.lockName=name; 070 this.lockOperation=operation; 071 setDetail(detail); 072 } 073 074 @Override 075 public CatchBlock getCatchBlock(Config config) { 076 CatchBlock sct=super.getCatchBlock(config); 077 sct.setEL("LockName",lockName); 078 sct.setEL("LockOperation",lockOperation); 079 return sct; 080 } 081}