Exception: CemAcpt::ImageBuilder::MissingTemplateError
- Inherits:
-
StandardError
- Object
- StandardError
- CemAcpt::ImageBuilder::MissingTemplateError
- Defined in:
- lib/cem_acpt/image_builder/errors.rb
Overview
Raised when an OS-specific image-builder Terraform template
(e.g. lib/terraform/image/<platform>/windows/main.tf) is missing
but the user has configured at least one image for that OS. The
builder catches this before invoking terraform init so users get
an actionable message instead of Terraform's "no configuration
files" output.
Instance Attribute Summary collapse
-
#os_str ⇒ Object
readonly
Returns the value of attribute os_str.
-
#template_path ⇒ Object
readonly
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize(os_str, template_path) ⇒ MissingTemplateError
constructor
A new instance of MissingTemplateError.
Constructor Details
#initialize(os_str, template_path) ⇒ MissingTemplateError
Returns a new instance of MissingTemplateError.
14 15 16 17 18 19 20 21 |
# File 'lib/cem_acpt/image_builder/errors.rb', line 14 def initialize(os_str, template_path) @os_str = os_str @template_path = template_path super( "No #{os_str} image-builder Terraform template ships with this version of cem_acpt " \ "(expected #{template_path}). Either upgrade cem_acpt or pass --no-#{os_str}." ) end |
Instance Attribute Details
#os_str ⇒ Object (readonly)
Returns the value of attribute os_str.
12 13 14 |
# File 'lib/cem_acpt/image_builder/errors.rb', line 12 def os_str @os_str end |
#template_path ⇒ Object (readonly)
Returns the value of attribute template_path.
12 13 14 |
# File 'lib/cem_acpt/image_builder/errors.rb', line 12 def template_path @template_path end |