Skip to content

Commit

Permalink
Fixed compilation error due to class name change
Browse files Browse the repository at this point in the history
  • Loading branch information
qvad committed Sep 14, 2023
1 parent 9b8a16e commit c4986ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions yugabyte/src/yugabyte/ysql/append_table.clj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
[:k :timestamp :default "NOW()"]
[:v :int]]
{:conditional? true}))
(catch org.postgresql.util.PSQLException e
(catch com.yugabyte.util.PSQLException e
(when-not (re-find #"already exists" (.getMessage e))
(throw e)))))

Expand All @@ -103,7 +103,7 @@
`(info "Creating table" ~table-sym "and retrying")
`(create-table! ~conn ~table-sym)
body)
~(apply catch-dne 'org.postgresql.util.PSQLException table-sym
~(apply catch-dne 'com.yugabyte.util.PSQLException table-sym
`(info "Creating table" ~table-sym "and retrying")
`(create-table! ~conn ~table-sym)
body)
Expand Down
4 changes: 2 additions & 2 deletions yugabyte/src/yugabyte/ysql/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
(update op :error (partial vector :batch)))
{:type :info, :error [:batch-update m]})

org.postgresql.util.PSQLException
com.yugabyte.util.PSQLException
(condp re-find m
#"(?i)Conflicts with [- a-z]+ transaction"
{:type :fail, :error [:conflicting-transaction m]}
Expand Down Expand Up @@ -300,7 +300,7 @@
[& body]
`(util/with-retry [attempts# max-retry-attempts]
~@body
(catch org.postgresql.util.PSQLException e#
(catch com.yugabyte.util.PSQLException e#
(let [m# (.getMessage e#)]
(if (or (re-find #"duplicate key value violates unique constraint" m#)
(re-find #"A relation has an associated type of the same name" m#)
Expand Down
6 changes: 3 additions & 3 deletions yugabyte/src/yugabyte/ysql/default_value.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
[[:dummy :int]
[:v :int :default "0"]]
{:conditional? true}))
(catch org.postgresql.util.PSQLException e
(catch com.yugabyte.util.PSQLException e
(when-not (re-find #"already exists" (.getMessage e))
(throw e)))))

Expand Down Expand Up @@ -81,7 +81,7 @@
`(info "Creating table" ~table-sym "and retrying")
`(create-table! ~conn ~table-sym)
body)
~(apply catch-dne 'org.postgresql.util.PSQLException table-sym
~(apply catch-dne 'com.yugabyte.util.PSQLException table-sym
`(info "Creating table" ~table-sym "and retrying")
`(create-table! ~conn ~table-sym)
body)
Expand All @@ -108,7 +108,7 @@
(assoc op :type :ok))
:drop-column (do (drop-column! c table (:value op))
(assoc op :type :ok)))
(catch org.postgresql.util.PSQLException e
(catch com.yugabyte.util.PSQLException e
(if (re-find #"column .+ does not exist" (.getMessage e))
(assoc op :type :fail, :error :column-does-not-exist)
(throw e))))))
Expand Down

0 comments on commit c4986ec

Please sign in to comment.