Exception: Syskit::TaskNameAlreadyInUse
- Defined in:
- lib/syskit/exceptions.rb
Overview
Exception raised in RobyApp::Configuration#use_deployment when trying to register a deployment that provides a task identical to an existing task
Instance Attribute Summary collapse
-
#existing_deployment ⇒ Models::ConfiguredDeployment
readonly
The already registered deployment.
-
#new_deployment ⇒ Models::ConfiguredDeployment
readonly
The new deployment.
-
#task_name ⇒ String
readonly
The problematic task name.
Instance Method Summary collapse
-
#initialize(task_name, existing_deployment, new_deployment) ⇒ TaskNameAlreadyInUse
constructor
A new instance of TaskNameAlreadyInUse.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(task_name, existing_deployment, new_deployment) ⇒ TaskNameAlreadyInUse
Returns a new instance of TaskNameAlreadyInUse
927 928 929 930 |
# File 'lib/syskit/exceptions.rb', line 927 def initialize(task_name, existing_deployment, new_deployment) @task_name, @existing_deployment, @new_deployment = task_name, existing_deployment, new_deployment end |
Instance Attribute Details
#existing_deployment ⇒ Models::ConfiguredDeployment (readonly)
Returns the already registered deployment
923 924 925 |
# File 'lib/syskit/exceptions.rb', line 923 def existing_deployment @existing_deployment end |
#new_deployment ⇒ Models::ConfiguredDeployment (readonly)
Returns the new deployment
925 926 927 |
# File 'lib/syskit/exceptions.rb', line 925 def new_deployment @new_deployment end |
#task_name ⇒ String (readonly)
Returns the problematic task name
920 921 922 |
# File 'lib/syskit/exceptions.rb', line 920 def task_name @task_name end |
Instance Method Details
#pretty_print(pp) ⇒ Object
932 933 934 935 936 937 938 |
# File 'lib/syskit/exceptions.rb', line 932 def pretty_print(pp) pp.text "trying to register #{task_name} from " new_deployment.pretty_print(pp) pp.breakable pp.text "but it is already provided by " existing_deployment.pretty_print(pp) end |