[TECH] Coding Development

TEMCO
TEMCO
3 min readApr 11, 2019

--

Today, we would like to explain about the reasons for choosing “Exception” as part of our coding development.

Please take your time reading through, since this may be an important aspect of GUHADA that you might want to know.

First of all, as it all means, the “Exception” is sort of an error caused by a system of a platform. We can separate the “Exception” into two parts:

1. Syntax Error: This happens when there is an asymmetrical syntax problem in the Java coding process, and it is an error that occurs during compiling.
2. Compile Error: An error that occurs during the program operation

For the compile error, there are 3 types:
1. Logic Error
2. Error due to java virtual machine itself
3. Exception

In this case, the logic error has to be coded in such a way that the logic contradiction cannot exist, however, the Java virtual machine error is not something the developer can take the responsibility of.

But, the exception is an error that can be fixed by the developer, although the frequency of it is unexpected and not recurrent.

For the Java virtual machine launcher error, if an exception occurs during the operation, it creates the exception object from the class that is related to the exception, sending it over to exception processing syntax, designated by the program. The exception processing syntax gets signal from the java virtual machine and receives the exception object from the java virtual machine launcher and completes the appropriate processing.

Logic Exception is an expected situation error.
For example, it can be an error that comes up when a wrong password is entered during the login.

TEMCO’s development about the exception system is composed of a system and logic exception.

So let's take a closer look at the case for the exception through coding itself.

Error Response

Error response development: Below shows results type-value when it is delivered from backend to the front end. When the exception happens, it justifies the results code and sends the contents as below:

GUHADA Exception Response

We have the coding configured by extending GUHADA API Response:

Exception Controller Advice

Exception Controller Advice is a Controller that process the exception in Java project:

We have set justification for various errors, so that basic errors match with each situation, justifying the exception handler in a specific way. We are planning on adding more situational cases for unexpected situations.

Runtime Execution

To comply with the errors message in various situations, we’ve received diverse param for the processing of the Runtime Exception.

TEMCO: Innovative Supply Chain Data and E-Commerce Solution through Blockchain and Smart Contract Technology.

Please visit us to learn more about the blockchain and smart contract based supply chain data/e-commerce platform!

▶TEMCO Chatroom: https://t.me/temcolabs
▶TEMCO Official Website: https://temco.io

--

--

TEMCO
TEMCO
Writer for

Blockchain-based Supply Chain Data Management and E-commerce Open Market Platform, GUHADA.