mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 10:55:22 +00:00
MSPF-91: crash if checkout_object returned 'object_not_found' (#42)
This commit is contained in:
parent
f26fa86b8d
commit
d1d631c791
@ -47,9 +47,14 @@ all(Revision) ->
|
||||
-spec get(revision(), ref()) -> data().
|
||||
|
||||
get(Revision, Ref) ->
|
||||
try
|
||||
#'VersionedObject'{object = Object} = dmt_client:checkout_object({version, Revision}, Ref),
|
||||
{_Tag, {_Name, _Ref, Data}} = Object,
|
||||
Data.
|
||||
Data
|
||||
catch
|
||||
throw:object_not_found ->
|
||||
error({object_not_found, {Revision, Ref}})
|
||||
end.
|
||||
|
||||
-spec commit(revision(), dmt:commit()) -> ok.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user