Skip to content
This repository has been archived by the owner on Jul 3, 2018. It is now read-only.

Commit

Permalink
#9 successful close()
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Sep 5, 2014
1 parent a7c36ad commit 98593ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions prods/src/packet/RP_OpenedDataObjInp.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ class RP_OpenedDataObjInp extends RODSPacket {
public function __construct($fd = -1, $length = 0, $offset = 0, $whence = self::SEEK_START, $oprType = 0, $KeyValPair_PI = null) {

if ($fd == -1) {
throw new IllegalArgumentException("fd must be > -1");
throw new InvalidArgumentException("fd must be > -1");
}

if ($offset < 0) {
throw new IllegalArgumentException("offset must be non negative");
throw new InvalidArgumentException("offset must be non negative");
}

if ($length <= 0) {
throw new IllegalArgumentException("length must be greater than zero");
if ($length < 0) {
throw new InvalidArgumentException("length must be greater than or equal to zero");
}

if ($oprType < 0) {
throw new IllegalArgumentException("oprtType must be greater than zero");
throw new InvalidArgumentException("oprtType must be greater than zero");
}

if ($whence >= SEEK_START && $whence <= SEEK_END) {
//ok
} else {
throw new IllegalArgumentException("invalid whence value");
throw new InvalidArgumentException("invalid whence value");
}
if (!isset($KeyValPair_PI)) {
$KeyValPair_PI = new RP_KeyValPair();
Expand Down

0 comments on commit 98593ae

Please sign in to comment.