Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Data API Reader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Utils
FACT Data API Reader
Commits
0c58da39
Commit
0c58da39
authored
1 year ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Moved missing travel time out of try catch
parent
045cf7fd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/FACT_road.jl
+2
-1
2 additions, 1 deletion
src/FACT_road.jl
with
2 additions
and
1 deletion
src/FACT_road.jl
+
2
−
1
View file @
0c58da39
...
...
@@ -49,6 +49,8 @@ function travel_time_in_minutes(ws_host_port::String, selection::Dict)
# Construct the request URL
url
=
"
$
ws_host_port/route/v1/driving/
$(start_longitude)
,
$(start_latitude)
;
$(end_longitude)
,
$(end_latitude)
?overview=false"
travel_time
=
missing
# Use `missing` to represent null in Julia
try
# Make the request
response
=
HTTP
.
get
(
url
)
...
...
@@ -63,7 +65,6 @@ function travel_time_in_minutes(ws_host_port::String, selection::Dict)
travel_time
=
travel_time_seconds
/
60
catch
e
println
(
"Error during HTTP request or response parsing: "
,
e
)
travel_time
=
missing
# Use `missing` to represent null in Julia
end
# Populate the columns
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment