Skip to content

Commit 48c48c7

Browse files
committed
handle error
1 parent 462c17e commit 48c48c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/mtl/log_state.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ function MTLLogState(dev::MTLDevice, descriptor::MTLLogStateDescriptor)
3535
err = Ref{id{NSError}}(nil)
3636
handle = @objc [dev::id{MTLDevice} newLogStateWithDescriptor:descriptor::id{MTLLogStateDescriptor}
3737
error:err::Ptr{id{NSError}}]::id{MTLLogState}
38+
err[] == nil || throw(NSError(err[]))
3839
MTLLogState(handle)
3940
end

0 commit comments

Comments
 (0)