Location: PHPKode > projects > Network Configuration Store > NCS-3.0.2/wwwroot/inc/CSException.class.php
<?php

// Define our generic Exception class to trap NCS exceptions easily later on.
//
class CSException extends Exception { };




// CS::GetFileContents() errors
class CSFileReadException extends CSException {
	public function __construct($fileName) {
		parent::__construct('The file "'.$fileName.'" cannot be read.');
	}
}

class CSFileWriteException extends CSException {
	public function __construct($fileName) {
		parent::__construct('The file "'.$fileName.'" cannot be written to.');
	}
}



// Arg missing
class CSArgumentMissingException extends CSException {
	public function __construct($argName) {
		parent::__construct('The parameter "'.$argName.'" is missing.');
	}
}

// Arg invalid
class CSArgumentInvalidException extends CSException {
	public function __construct($argName) {
		parent::__construct('The value of "'.$argName.'" is invalid.');
	}
}


class CSNoDeviceGroupsException extends CSException {
	public function __construct() {
		parent::__construct('You cannot create a new device profile until you configure at least one Device Group.');
	}
}




class CSHostnameException extends CSException {
	public function __construct() {
		parent::__construct('You must specify a hostname.');
	}
}
class CSDeviceTypeException extends CSException {
	public function __construct() {
		parent::__construct('The device type is not valid.');
	}
}
class CSIPAddressException extends CSException {
	public function __construct() {
		parent::__construct('You did not specify a valid IPv4 Address.');
	}
}

class CSActionUnconfirmedException extends CSException {
	public function __construct() {
		parent::__construct('You must <a href="javascript:history.back(1);">go back</a> and confirm this action to proceed.');
	}
}

class CSEmailAddressException extends CSException {
	public function __construct($addr) {
		parent::__construct('The e-mail address you have specified ("'.$addr.'") is invalid.');
	}
}

class CSThreadCountInvalidException extends CSException {
	public function __construct() {
		parent::__construct('The maximum number of threads you specified is not valid. Please specify a positive integer between 1 and 50 inclusive.');
	}
}

class CSPathInvalidException extends CSException {
	public function __construct($path) {
		parent::__construct('The path "'.$path.'" specified does not exist or is not accessible.');
	}
}


class CSCompareNoCurrException extends CSException {
	public function __construct() {
		parent::__construct('This comparison is invalid; the device has no configuration revisions in history.');
	}
}

class CSCompareNoPrevException extends CSException {
	public function __construct() {
		parent::__construct('This comparison is invalid; the device only has one configuration revision in history.');
	}
}

class CScompareBackwardException extends CSException {
	public function __construct() {
		parent::__construct('This comparison is invalid; you cannot compare a newer revision to an older one.');
	}
}

?>
Return current item: Network Configuration Store