This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
DeskHubSharp/DeskHubSharp.Models/Opener.fs

16 lines
340 B
Forth
Raw Normal View History

2018-12-16 13:35:17 -06:00
module Opener
open System.IO
open System.Diagnostics
let file =
try
use file = File.OpenRead "config.xml"
Some <| file.Read
with
:? FileNotFoundException as ex ->
printfn "%s was not found. Does it exist?" ex.FileName
None
_ -> printfn "Error loading file..."
reraise()