FCF 2.0 development in progress...
> > > > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

message property from fcf.Exception class

string message

Class: fcf.Exception

File: fcf-framework-core:fcf.js

Available from version: 2.0.2

Human readable error message. When generating this message, tokenization and automatic translation into the user's language is performed.

Example: Applying a property

fcf.addException("TEST_EXCEPTION", "Test exception: @{{value}}@"); fcf.getConfiguration().append({ translations:[ { language: "ja", translations:{ "Test exception: @{{value}}@": "テスト例外: @{{value}}@" } } ] }) let error1 = new fcf.Exception("TEST_EXCEPTION", {value: 1}); console.log("Message (default language):", error1.message); fcf.getContext().language = "ja" let error2 = new fcf.Exception("TEST_EXCEPTION", {value: 1}); console.log("Message (ja language) :", error2.message);

Output:

Message (default language): Test exception: 1 Message (ja language) : テスト例外: 1