Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Automation – How to get the ExitFail message from a subscript?

Solved558 views18th January 2024Automation
2
Jens Vandewalle [SLC] [DevOps Enabler]9.44K 18th January 2024 0 Comments

Hi Dojo,

I have a script that shows an error message when something goes wrong by using engine.ExitFail() method.

This is also visible in the automation logging.

2024/01/18 10:04:11.452|SLAutomation.exe 10.4.2347.224|20848|16900|Script|INF|-1|[Jens Vandewalle] (Script Cost and Billing - Script - Calculate Cost) Log Message: "System.Exception: Ratecard not found for resource Teleste IP receiver module 1
   at Script.FetchResourceRatecard(NodeDetails node)
   at Script.LoadRatecardsForAllNodes(IEnumerable`1 nodes)
   at Script.RunSafe(IEngine engine)
   at Script.Run(IEngine engine)"

But when I execute this script from inside another script, I don’t get the ExitFail message from that subscript.

2024/01/18 10:04:11.455|SLAutomation.exe 10.4.2347.224|20848|16116|Script|INF|-1|[Jens Vandewalle] (Script ResourceScheduling_Job DOM Button Actions) Log Message: "(Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Run Subscript 'Cost and Billing - Script - Calculate Cost' Failed: 0x80004005
   at Skyline.DataMiner.Automation.Engine.InternalLaunchSubScript(String scriptName, List`1 finalOptions, Int32 inheritSubScript, Int32 extendedErrorInfo, Dictionary`2& subScriptOutput, List`1& errorMessages)
   at Skyline.DataMiner.Automation.SubScriptOptions.StartScript()
   at ResourceScheduling_Job_DOM_Button_Actions_1.Script.CalculateCostAndBilling()
   at ResourceScheduling_Job_DOM_Button_Actions_1.Script.HandleRecalculateCostAndBillingAction()
   at ResourceScheduling_Job_DOM_Button_Actions_1.Script.RunSafe()
   at ResourceScheduling_Job_DOM_Button_Actions_1.Script.Run(IEngine engine)"

How can I receive the ExitFail message from the subscript?

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 18th January 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
7
André Rodrigues [SLC] [DevOps Member]709 Posted 18th January 2024 0 Comments

Hi Jens,

You can retrieve the ExitFail message by setting the “Extended Error Info” flag and then using GetErrorMessages() method.

E.g.,

var script = engine.PrepareSubScript(“Cost and Billing – Script – Calculate Cos”);
script.ExtendedErrorInfo = true;

script.StartScript();
if (script.HadError)
{
var errors = script.GetErrorMessages();
// Handle errors…
}

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 18th January 2024
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs