Explorar o código

Basic error handling

Nathaniel van Diepen %!s(int64=10) %!d(string=hai) anos
pai
achega
7c12655c4d
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      api.php

+ 3 - 3
api.php

@@ -22,12 +22,12 @@
 					// TODO - handle admin requests
 				break;
 				default:
-					// TODO - handle type invalid
+					die("invalid type");
 			}
 		}else{
-			// TODO - handle id missing
+			die("id missing");
 		}
 	}else{
-		// TODO - handle type missing
+		die("type missing");
 	}
 ?>