Skip to content

Commit

Permalink
[screenshot] exception handling for screenshot requests; [cef example…
Browse files Browse the repository at this point in the history
…] fixed bitness
  • Loading branch information
haraldsteinlechner committed Oct 11, 2022
1 parent 3d2f024 commit fbbecc1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 5.3.3
- exception handling for screenshots

### 5.3.2
- Fixed CEF processes nuget packages
- [Screenshot] Save image with alpha when using PNG
Expand Down
4 changes: 2 additions & 2 deletions src/Aardvark.Service.Giraffe/Server.fs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ module Server =
}


let private screenshot (sceneName : string) (next : HttpFunc) (ctx : HttpContext) =
let screenshot' (sceneName : string) (next : HttpFunc) (ctx : HttpContext) =
let request = ctx.Request
let args = request.Query |> Seq.choose (fun v -> match v.Value with | SingleString s -> Some (v.Key, s) | _ -> None) |> Map.ofSeq

Expand Down Expand Up @@ -588,7 +588,7 @@ module Server =

let screenshot (sceneName : string) (next : HttpFunc) (ctx : HttpContext) =
try
screenshot sceneName next ctx
screenshot' sceneName next ctx
with e ->
RequestErrors.BAD_REQUEST (sprintf "could not render screenshot (cause: %s)" e.Message) next ctx

Expand Down
2 changes: 1 addition & 1 deletion src/Aardvark.Service/SuaveServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ module Server =
let json = Pickler.json.PickleToString stats
ctx |> (OK json >=> Writers.setMimeType "text/json")

let private screenshot' (sceneName : string) (context: HttpContext) =
let screenshot' (sceneName : string) (context: HttpContext) =
let request = context.request
let args = request.query |> List.choose (function (n,Some v) -> Some(n,v) | _ -> None) |> Map.ofList

Expand Down
2 changes: 1 addition & 1 deletion src/Aardvark.UI.Primitives/UI.Primitives.fs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Html =

let horizontal ch = table [clazz "ui table"; style "backgroundColor: transparent"] [ tbody [] [ tr [] ch ] ]

let finish<'msg> = td[] []
let finish<'msg> = td [] []

let ofC4b (c : C4b) = sprintf "rgb(%i,%i,%i)" c.R c.G c.B

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net471</TargetFramework>
<DisableImplicitFSharpCoreReference>True</DisableImplicitFSharpCoreReference>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\..\bin\Debug\</OutputPath>
Expand Down

0 comments on commit fbbecc1

Please sign in to comment.