From d36a87bff55b7133ca2a55fa8632fe7485f74cd9 Mon Sep 17 00:00:00 2001 From: oakes Date: Wed, 17 Sep 2014 14:11:18 -0400 Subject: [PATCH] Throw exception in deprecated functions --- src/play_clj/core.clj | 2 +- src/play_clj/core_basics.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/play_clj/core.clj b/src/play_clj/core.clj index 681bd37..b5a436b 100644 --- a/src/play_clj/core.clj +++ b/src/play_clj/core.clj @@ -567,4 +567,4 @@ of key-value pairs, which will be given to the function via its screen map. (defn run! "Deprecated. Please use `screen!` instead." [& args] - (apply screen! args)) + (throw (Exception. "Replace run! with screen!"))) diff --git a/src/play_clj/core_basics.clj b/src/play_clj/core_basics.clj index 19bfbfe..ebc26e6 100644 --- a/src/play_clj/core_basics.clj +++ b/src/play_clj/core_basics.clj @@ -101,8 +101,8 @@ :fps (graphics! :get-frames-per-second) :fullscreen? (graphics! :is-fullscreen) :touched? (input! :is-touched) - :x (input! :get-x) ; deprecated, use :point-x instead - :y (input! :get-y) ; deprecated, use :point-y instead (it is flipped) + :x (throw (Exception. "Replace (game :x) with (input! :get-x)")) + :y (throw (Exception. "Replace (game :y) with (input! :get-y)")) :point-x (input! :get-x (or arg 0)) :point-y (- (graphics! :get-height) (input! :get-y (or arg 0))) (u/throw-key-not-found k)))