R/conditions.R

Defines functions deprecated stop_iteration_error warn not_implemented_error runtime_error type_error value_error

value_error <- function(..., env = rlang::caller_env()) {
  rlang::abort(glue::glue(..., .envir = env), class = "value_error")
}

type_error <- function(..., env = rlang::caller_env()) {
  rlang::abort(glue::glue(..., .envir = env), class = "type_error")
}

runtime_error <- function(..., env = rlang::caller_env()) {
  rlang::abort(glue::glue(..., .envir = env), class = "runtime_error")
}

not_implemented_error <- function(..., env = rlang::caller_env()) {
  rlang::abort(glue::glue(..., .envir = env), class = "not_implemented_error")
}

warn <- function(..., env = rlang::caller_env()) {
  rlang::warn(glue::glue(..., .envir = env), class = "warning")
}

stop_iteration_error <- function(..., env = rlang::caller_env()) {
  rlang::abort(glue::glue(..., .envir = env), class = "stop_iteration_error")
}

inform <- rlang::inform

deprecated <- function(..., env = rlang::caller_env()) {
  rlang::warn(..., class = "deprecated")
}

Try the torch package in your browser

Any scripts or data that you put into this service are public.

torch documentation built on Jan. 24, 2023, 1:05 a.m.