ContentsIndexHome
PreviousUpNext
ISession.clearBuffers Method

Empties all buffers, enabling the session to close without further errors. 

 

Java
void clearBuffers();

Typically, you can call this method when you catch an exception and know that, as a result, there might be more errors due to the structure of the AIMMS model. 

E.g. when changing a lower bound of an identifier fails, assignments to the identifier itself will subsequently fail as well. The SDK will normally buffer all these changes and flush them as a whole; in this case, you would therefore first receive an error on setting the lower bound and then, when continuing after catching the exception, you will get another error on failing to assign the actual data, because the lower bound criterion is not met. In such a scenario, you might want call clearBuffers in the first catch, to prevent further failures.