/** * @param int $code * @param string|null $message * @param \Exception|null $previous * @param mixed|null $context * * @throws \InvalidArgumentException */ public function __construct($code, $message = null, $previous = null, $context = null) { if (!\Kisma\Core\Enums\HttpResponse::contains($code)) { throw new \InvalidArgumentException('The code "' . $code . '" is not a valid HTTP response code.'); } if (null === $message) { $message = \Kisma\Core\Utility\Inflector::untag(\Kisma\Core\Enums\HttpResponse::nameOf($code)); } parent::__construct($message, $code, $previous, $context); }
* 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. */ use Kisma\Core\Enums\HttpResponse; /** * @var $this WebController * @var $string $type * @var string $message string * @var int $code */ $_niceCode = HttpResponse::prettyNameOf($code, true); ?> <div class="container-fluid container-error"> <h1>Well, this is embarrassing...</h1> <p class="lead">The server has experienced a fatal error. Our administrators will automatically be notified. However, if you would like to report additional information regarding this particular error, please open a case on our <a target="_blank" href="https://github.com/dreamfactorysoftware/dsp-core/issues">bug tracker</a>. </p> <div class="inset"> <h3>Error <?php echo $code; ?> </h3> </div>