Try/Catch

    0

    6

    Daniel Garcia

    ColdFusion

    This code attempts to get a record from myService. If there is an error, it dumps the exception and aborts the call, otherwise it returns the record.

    try {
      record = myService.getRecord();
    } catch ( any e ) {
      writeDump( e );
      abort;
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.