the browser-facing portion of osu!
at master 548 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6namespace App\Exceptions; 7 8/** 9 * Exception thrown when a domain method fails an invariant constraint check. 10 * InvariantException::getMessage() should always be considered as safe for public. 11 * 12 * TODO: migrate more exceptions to this 13 */ 14class InvariantException extends SilencedException 15{ 16 public function getStatusCode() 17 { 18 return 422; 19 } 20}