• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • DBInterface C++ Classes
  • SQLException
  • 5.0.0

SQLException Class

(CDP2SQL::SQLException)

Generic SQLException base class. More...

Header: #include <SQLException>
  • List of all members, including inherited members

Public Functions

SQLException(const char *message = 0, int err = -1)
SQLException(const std::string &message, int err = -1)
~SQLException() override
virtual int Error() const
virtual std::string GetFormattedMessage() const
virtual const char *Message() const

Detailed Description

Generic SQLException base class.

Any of the CDP2SQL methods can throw this.

Member Function Documentation

SQLException::SQLException(const char *message = 0, int err = -1)

Creates an SQLException object with a message and error code err.

Does not take ownership of, nor copy of, the given error message string.

SQLException::SQLException(const std::string &message, int err = -1)

Creates an SQLException object with a message and error code err.

Does not take ownership of, nor copy of, the given error message string.

SQLException::~SQLException()

Destroys the instance of SQLException.

[virtual] int SQLException::Error() const

Returns error code if any.

[virtual] std::string SQLException::GetFormattedMessage() const

Includes Message() and if set then also Error() *

[virtual] const char *SQLException::Message() const

Returns the error message for this exception.

Can be overriden by subclasses to create more dynamic error messages.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top