Skip to content

Commit

Permalink
Better warning
Browse files Browse the repository at this point in the history
  • Loading branch information
p2 committed Sep 19, 2016
1 parent 57d8df4 commit d0f0113
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Client/Reference+Resolving.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ extension Reference {
Resolves the reference, automatically determining how to resolve it from either contained, bundled or fetching from a server.

Checks if a reference can be resolved immediately by calling `resolved(type:)` first, if not proceeds to request the referenced resource
from the respective location.
from the respective location. Contained resources are always found by `resolved(type:)`, so this method body is only executed if no
contained resource with the given identifier was found.

- parameter type: The type of the resource to expect
- parameter type: The type of the resource to expect
- parameter callback: The callback to call upon success or failure, with the resolved resource or nil
*/
public func resolve<T: Resource>(_ type: T.Type, callback: @escaping ((T?) -> Void)) {
Expand Down Expand Up @@ -125,7 +126,7 @@ extension Reference {
}
}
else {
fhir_warn("reference \(self) does not have a server instance, cannot resolve «\(ref)»")
fhir_warn("resource \(self) does not have a server instance nor does it contain «\(ref)», cannot resolve")
callback(nil)
}
}
Expand Down

0 comments on commit d0f0113

Please sign in to comment.