Skip to content

Commit 0812b26

Browse files
committed
multi error checking, version bump, fix shards install for crystal 1
1 parent c3baba8 commit 0812b26

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

shard.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: crecto
2-
version: 0.12.0
2+
version: 0.12.1
33

44
authors:
55
- Nick Franken <shnick@gmail.com>
66

77
license: MIT
88

9+
crystal: ">= 1.0.0, < 2.0.0"
10+
911
dependencies:
1012
db:
1113
github: crystal-lang/crystal-db

src/crecto/repo.cr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ module Crecto
542542

543543
{% for operation in %w[insert update delete] %}
544544
private def run_operation(operation : Multi::{{operation.camelcase.id}}, tx)
545-
{{operation.id}}(operation.instance, tx)
545+
cs = {{operation.id}}(operation.instance, tx)
546+
raise cs.errors.first[:message] if !cs.valid?
546547
rescue ex : Exception
547548
raise OperationError.new(ex, operation.instance.class, {{operation}})
548549
end

src/crecto/version.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Crecto
2-
VERSION = "0.12.0"
2+
VERSION = "0.12.1"
33
end

0 commit comments

Comments
 (0)