1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-27 20:08:22 +01:00
Diya-API/Diya/DiyaBaseObject.class.st

48 lines
952 B
Smalltalk
Raw Normal View History

2021-12-18 02:02:16 +01:00
Class {
#name : #DiyaBaseObject,
#superclass : #Object,
#category : #'Diya-Core'
}
2022-03-04 20:28:38 +01:00
{ #category : #accessing }
DiyaBaseObject >> checkGLError: mark [
|err|
err := OpenGL getError.
err = 0 ifFalse:[
self stderror:mark, ': return error code ', err hex.
].
]
2022-03-21 01:45:21 +01:00
{ #category : #asserting }
DiyaBaseObject >> shouldNotBeCalled [
^DiyaCoreAPIError signal: 'Should not be called'
]
{ #category : #accessing }
DiyaBaseObject >> stderr [
2022-03-04 20:28:38 +01:00
^VTermOutputDriver stderr
]
{ #category : #accessing }
DiyaBaseObject >> stderror: string [
2022-08-13 15:55:51 +02:00
self stderr
nextPutAll: DateAndTime now asString;
nextPutAll: ': ';
nextPutAll: string;
nextPutAll: Character cr asString.
2022-03-04 20:28:38 +01:00
]
{ #category : #accessing }
DiyaBaseObject >> stdlog: string [
2022-08-13 15:55:51 +02:00
self stdout
nextPutAll: DateAndTime now asString;
nextPutAll: ': ';
nextPutAll: string;
2022-03-04 20:28:38 +01:00
nextPutAll: Character cr asString.
]
{ #category : #accessing }
DiyaBaseObject >> stdout [
^ VTermOutputDriver stdout
]