Precompiled.InstallError exception (Precompiled v0.10.5)

Copy Markdown View Source

Raised by Precompiled.mix_install/2 when it installs nothing. raise Precompiled.InstallError, "text" and message: "text" work too, with reason nil.

reason is the term: one of Precompiled.install/2's error reasons (listed in Precompiled), or one of mix_install/2's own:

  • {:bad_dep, dep}, {:bad_requirement, app, requirement};
  • {:dep_option, app, key, value}, a dependency option a device cannot honour (path:, git:, only:, ...);
  • {:mix_option, key, value}, a Mix.install/2 option a device cannot honour (lockfile:, config_path:, a non-empty system_env:), or an install/2 option mix_install/2 does not take (dry_run:, report:, start:);
  • {:config_protected, app, :otp | :elixir | :installer}, config: for an app of OTP or Elixir, or one this library runs on or reads (itself, its runtime closure, castore, nerves_runtime, nerves_time);

  • {:elixir, requirement, version}, the elixir: option misses;
  • {:firmware_version, app, version, requirement}, an app the firmware has at a version the requirement misses;
  • {:installed_version, app, version, requirement}, the same for an app installed earlier in this VM;
  • {:version_unreadable, app, version, requirement}, an app the device has at a version no requirement can be checked against (OTP's four-part versions such as 11.7.8.1);
  • {:config_compile_env, app, version, :firmware | :installed, text}, config: changes what an app the device has read at compile time;

  • {:config_unchecked, app, version, :firmware | :installed}, any config: while an app the device has has compile-time reads that cannot be told (a firmware .app that does not read, or an app loaded from a store that this client did not activate in this VM);

  • {:start_failed, app, why}, an app that did not start.

message says it in words.

Summary

Types

t()

@type t() :: %Precompiled.InstallError{
  __exception__: term(),
  message: String.t(),
  reason: term()
}