This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dev:logging [2014/07/21 10:03] – external edit 127.0.0.1 | dev:logging [2022/12/20 11:29] (current) – [Error Reporting] ursgraf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Logging and Error Reporting ====== | ====== Logging and Error Reporting ====== | ||
| ===== Logging ===== | ===== Logging ===== | ||
| - | The class // | + | The class // |
| * log: is used for normal logging (e.g. successful compilation) | * log: is used for normal logging (e.g. successful compilation) | ||
| Line 11: | Line 11: | ||
| ==== Debug Output ==== | ==== Debug Output ==== | ||
| - | Für ausführliche Debugausgaben während der Entwicklung und Fehlersuche wenden wir aus Effizienzgründen folgendes Verfahren an: | + | Debug output is very convenient during the development process. For efficiency reasons we use the following scheme: Every class has a constant |
| - | Pro Klasse kann eine Konstante vom Typ boolean | + | |
| ===== Error Reporting ===== | ===== Error Reporting ===== | ||
| - | Für die Fehler-Ausgabe sollte die Klasse ErrorReporter im Package //ch.ntb.inf.deep.host// verwendet werden. Bei jeder Ausgabe eines Fehlers wird die statische Variable | + | The class '' |
| - | Der ErrorReporter | + | The '' |
| - | Die Methoden | + | Further, there is a method //error(String |
| - | + | ||
| - | Im Weitern gibt es noch die Methode | + | |
| - | muss. | + | |
| ==== Stopping after Error ==== | ==== Stopping after Error ==== | ||
| - | Der Launcher prüft vor jedem weiteren Schritt, ob kein Fehler aufgetreten ist. Was aber passiert, wenn innerhalb eines Schrittes | + | The launcher checks if no error occured before starting the next step. However, what happens if there is an error within a step (e.g. while allocating registers) and it's not possible to complete this step? We do not want to check for // |
| - | Alle Methoden sollen so geschrieben werden, dass im Fehlerfall der ErrorReporter aufgerufen wird, aber die Methode trotzdem einen brauchbaren Rückgabewert liefert | + | Every method should call the error reporter in case of an error and at the same time it should return a useable value (e.g. register |
| - | Es macht trotzdem Sinn daneben auch Assertions einzubauen. Diese sind dann nützlich, wenn wir als Entwickler den Fehler genau zu lokalisieren versuchen. | + | Use assertions whenever possible. They will be switched of in the productive code but can be enabled during the development process. |
| \\ | \\ | ||
| ---- | ---- | ||
| Line 132: | Line 128: | ||
| |808|bypass is not unlocked| | |808|bypass is not unlocked| | ||
| |809|programming failed| | |809|programming failed| | ||
| + | |810|programmer not found| | ||
| + | |811|class to connect to programmer not found| | ||
| + | |812|plugin not found| | ||
| + | |813|BDI packet wrong, try to reset BDI| | | ||
| + | |814|ready bit not set, try to reset BDI| | | ||
| === Debugger: 900 - 999 === | === Debugger: 900 - 999 === | ||