Author: mturk
Date: Mon Apr 25 13:34:42 2011
New Revision: 1096475
URL: http://svn.apache.org/viewvc?rev=1096475&view=rev
Log:
Add new exception classes
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/AccessDeniedException.java
(with props)
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidArgumentException.java
(with props)
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidRangeException.java
(with props)
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/NameTooLongException.java
(with props)
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotImplementedException.java
(with props)
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotPermittedException.java
(with props)
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ClosedDescriptorException.java
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidDescriptorException.java
commons/sandbox/runtime/trunk/src/main/native/configure
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/AccessDeniedException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/AccessDeniedException.java?rev=1096475&view=auto
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/AccessDeniedException.java
(added)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/AccessDeniedException.java
Mon Apr 25 13:34:42 2011
@@ -0,0 +1,39 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+
+/**
+ * AccessDeniedException thrown when an attempt is made to
+ * invoke an operation which results in denied perimission.
+ * This class mimics the os {@code EACCES} error.
+ *
+ * @since Runtime 1.0
+ */
+
+public class AccessDeniedException extends SystemException
+{
+
+ public AccessDeniedException()
+ {
+ super();
+ }
+
+ public AccessDeniedException(String msg)
+ {
+ super(msg);
+ }
+}
Propchange:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/AccessDeniedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ClosedDescriptorException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ClosedDescriptorException.java?rev=1096475&r1=1096474&r2=1096475&view=diff
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ClosedDescriptorException.java
(original)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ClosedDescriptorException.java
Mon Apr 25 13:34:42 2011
@@ -23,7 +23,7 @@ import java.io.IOException;
*
* @since Runtime 1.0
*/
-public class ClosedDescriptorException extends SystemException
+public class ClosedDescriptorException extends InvalidDescriptorException
{
public ClosedDescriptorException()
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidArgumentException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidArgumentException.java?rev=1096475&view=auto
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidArgumentException.java
(added)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidArgumentException.java
Mon Apr 25 13:34:42 2011
@@ -0,0 +1,39 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+import java.io.IOException;
+
+/**
+ * InvalidArgumentException thrown when an attempt is made to
+ * invoke an operation with invalid arguments.
+ * This class mimics the os {@code EINVAL} error.
+ *
+ * @since Runtime 1.0
+ */
+public class InvalidArgumentException extends SystemException
+{
+
+ public InvalidArgumentException()
+ {
+ super();
+ }
+
+ public InvalidArgumentException(String msg)
+ {
+ super(msg);
+ }
+}
Propchange:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidArgumentException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidDescriptorException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidDescriptorException.java?rev=1096475&r1=1096474&r2=1096475&view=diff
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidDescriptorException.java
(original)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidDescriptorException.java
Mon Apr 25 13:34:42 2011
@@ -20,6 +20,7 @@ import java.io.IOException;
/**
* InvalidDescriptorException thrown when an attempt is made to
* invoke an operation on invalid {@code descriptor}.
+ * This class mimics the os {@code EBADF} error.
*
* @since Runtime 1.0
*/
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidRangeException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidRangeException.java?rev=1096475&view=auto
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidRangeException.java
(added)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidRangeException.java
Mon Apr 25 13:34:42 2011
@@ -0,0 +1,38 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+import java.io.IOException;
+
+/**
+ * InvalidRangeException thrown when result too large.
+ * This class mimics the os {@code ERANGE} error.
+ *
+ * @since Runtime 1.0
+ */
+public class InvalidRangeException extends SystemException
+{
+
+ public InvalidRangeException()
+ {
+ super();
+ }
+
+ public InvalidRangeException(String msg)
+ {
+ super(msg);
+ }
+}
Propchange:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/InvalidRangeException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/NameTooLongException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/NameTooLongException.java?rev=1096475&view=auto
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/NameTooLongException.java
(added)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/NameTooLongException.java
Mon Apr 25 13:34:42 2011
@@ -0,0 +1,38 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+import java.io.IOException;
+
+/**
+ * NameTooLongException thrown when name is too long.
+ * This class mimics the os {@code ENAMETOOLONG} error.
+ *
+ * @since Runtime 1.0
+ */
+public class NameTooLongException extends SystemException
+{
+
+ public NameTooLongException()
+ {
+ super();
+ }
+
+ public NameTooLongException(String msg)
+ {
+ super(msg);
+ }
+}
Propchange:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/NameTooLongException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotImplementedException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotImplementedException.java?rev=1096475&view=auto
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotImplementedException.java
(added)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotImplementedException.java
Mon Apr 25 13:34:42 2011
@@ -0,0 +1,38 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+
+/** OperationNotImplementedException.
+ * This class mimics the os {@code ENOTIMPL} error.
+ *
+ * @author Mladen Turk
+ *
+ */
+
+public class OperationNotImplementedException extends SystemException
+{
+
+ public OperationNotImplementedException()
+ {
+ super();
+ }
+
+ public OperationNotImplementedException(String msg)
+ {
+ super(msg);
+ }
+}
Propchange:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotImplementedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotPermittedException.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotPermittedException.java?rev=1096475&view=auto
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotPermittedException.java
(added)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotPermittedException.java
Mon Apr 25 13:34:42 2011
@@ -0,0 +1,39 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+
+/**
+ * OperationNotPermittedException thrown when operation is
+ * not permitted.
+ * This class mimics the os {@code EPERM} error.
+ *
+ * @since Runtime 1.0
+ */
+
+public class OperationNotPermittedException extends SystemException
+{
+
+ public OperationNotPermittedException()
+ {
+ super();
+ }
+
+ public OperationNotPermittedException(String msg)
+ {
+ super(msg);
+ }
+}
Propchange:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/OperationNotPermittedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=1096475&r1=1096474&r2=1096475&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Mon Apr 25 13:34:42
2011
@@ -620,6 +620,7 @@ case "$host-$cctype" in
else
varadds cppopts -D_POSIX_PTHREAD_SEMANTICS
fi
+ varadds cppopts -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
-D__EXTENSIONS__
varadds ccflags -xstrconst -xdepend -O -Xa
varadds ccshare -KPIC
varadds ldflags -lrt -ldl -lthread -lsendfile -lsocket -lnsl