Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error handling #148

Merged
merged 3 commits into from May 26, 2018
Merged

Enhance error handling #148

merged 3 commits into from May 26, 2018

Conversation

Enchufa2
Copy link
Member

@Enchufa2 Enchufa2 commented May 26, 2018

Provide more informative error messages. Before the patch:

library(simmer)

t <- trajectory() %>%
  timeout(function() NULL)

simmer() %>%
  add_generator("dummy", t, at(pi)) %>%
  run()
#> Error in run_(private$sim_obj, until) :
#>  Expecting a single value: [extent=0].

After this patch, the error becomes

#> Error: 'dummy0' at 3.14 in 'Timeout':
#>  Expecting a single value: [extent=0].

which specifies the arrival name, the current simulation time and the activity type in which the error arised.

@codecov
Copy link

codecov bot commented May 26, 2018

Codecov Report

Merging #148 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #148   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          52     52           
  Lines        2848   2852    +4     
=====================================
+ Hits         2848   2852    +4
Impacted Files Coverage Δ
inst/include/simmer/process/datasrc.h 100% <100%> (ø) ⬆️
inst/include/simmer/simulator_impl.h 100% <100%> (ø) ⬆️
inst/include/simmer/activity/branch.h 100% <100%> (ø) ⬆️
inst/include/simmer/process/manager.h 100% <100%> (ø) ⬆️
inst/include/simmer/resource/priority.h 100% <100%> (ø) ⬆️
inst/include/simmer/process/arrival.h 100% <100%> (ø) ⬆️
inst/include/simmer/activity/utils/resgetter.h 100% <100%> (ø) ⬆️
inst/include/simmer/process/generator.h 100% <100%> (ø) ⬆️
inst/include/simmer/activity/arrival.h 100% <100%> (ø) ⬆️
inst/include/simmer/activity/timeout.h 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5905031...38586f8. Read the comment docs.

@Enchufa2 Enchufa2 merged commit 5a76685 into master May 26, 2018
@Enchufa2 Enchufa2 deleted the exceptions branch May 26, 2018 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant