DbException.java
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
- /*-
- * See the file LICENSE for redistribution information.
- *
- * Copyright (c) 1997, 1998, 1999, 2000
- * Sleepycat Software. All rights reserved.
- *
- * $Id: DbException.java,v 11.4 2000/02/14 02:59:56 bostic Exp $
- */
- package com.sleepycat.db;
- /**
- *
- * @author Donald D. Anderson
- */
- public class DbException extends Exception
- {
- // methods
- //
- public DbException(String s)
- {
- super(s);
- }
- public DbException(String s, int errno)
- {
- super(s);
- this.errno_ = errno;
- }
- public String toString()
- {
- String s = super.toString();
- if (errno_ == 0)
- return s;
- else
- return s + ": " + DbEnv.strerror(errno_);
- }
- // get/set methods
- //
- public int get_errno()
- {
- return errno_;
- }
- // private data
- //
- private int errno_ = 0;
- }
- // end of DbException.java