Skip to content

Commit

Permalink
printing warnings when Expr.TryGetReflectedDefinition fails
Browse files Browse the repository at this point in the history
  • Loading branch information
krauthaufen committed Oct 8, 2022
1 parent 4bdd37b commit 2699e04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 5.2.11
* printing warnings when Expr.TryGetReflectedDefinition fails

### 5.2.10
* try/with for Expr.TryGetReflectedDefinition (seems to raise exceptions in some cases)

Expand Down
4 changes: 3 additions & 1 deletion src/Libs/FShade.Imperative/Utilities.fs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ module ExprWorkardound =
let TryGetReflectedDefinition (mb : MethodBase) =
lock lockObj (fun _ ->
try Expr.TryGetReflectedDefinition mb
with _ -> None
with e ->
Aardvark.Base.Report.Warn(sprintf "Expr.TryGetReflectedDefinition failed on %0A %0A with:\r\n%0A" mb.DeclaringType mb e)
None
)

module Peano =
Expand Down

0 comments on commit 2699e04

Please sign in to comment.